Module jakarta.validation
Interface ValueExtractor.ValueReceiver
- Enclosing interface:
ValueExtractor<T>
public static interface ValueExtractor.ValueReceiver
Provides a set of methods receiving value extracted by the
ValueExtractor
.
The value has to be passed to the method corresponding best to the type of the original value.
- Since:
- 2.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
indexedValue
(String nodeName, int i, Object object) Receives the value extracted from an indexed object (e.g.void
iterableValue
(String nodeName, Object object) Receives the value extracted from an iterable object that is not indexed (e.g.void
keyedValue
(String nodeName, Object key, Object object) Receives the value extracted from a keyed object (e.g.void
Receives the value extracted from an object.
-
Method Details
-
value
-
iterableValue
Receives the value extracted from an iterable object that is not indexed (e.g. aIterable
,Set
or aMap
).- Parameters:
nodeName
- the name of the node representing the container element. If notnull
, the name will be used when adding a container element node to thePath
object
- the value to validate
-
indexedValue
Receives the value extracted from an indexed object (e.g. aList
).- Parameters:
nodeName
- the name of the node representing the container element. If notnull
, the name will be used when adding a container element node to thePath
i
- the index of the value in the original objectobject
- the value to validate
-
keyedValue
Receives the value extracted from a keyed object (e.g. aMap
).- Parameters:
nodeName
- the name of the node representing the container element. If notnull
, the name will be used when adding a container element node to thePath
key
- the key of the value in the original objectobject
- the value to validate
-