Package jakarta.validation
Interface ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeContextBuilder
-
- Enclosing interface:
- ConstraintValidatorContext.ConstraintViolationBuilder
public static interface ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeContextBuilder
Represents refinement choices for a node which is in an iterable, e.g. array,Iterable
orMap
.If the iterable is an indexed collection or a map, the index or the key should be set.
The node is a leaf node (i.e. no subnode can be added).
- Since:
- 1.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConstraintValidatorContext
addConstraintViolation()
Adds the newConstraintViolation
to be generated if the constraint validator mark the value as invalid.ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContext
atIndex(java.lang.Integer index)
Defines the index the object is into theList
or arrayConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContext
atKey(java.lang.Object key)
Defines the key the object is into theMap
.
-
-
-
Method Detail
-
atKey
ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContext atKey(java.lang.Object key)
Defines the key the object is into theMap
.- Parameters:
key
- map key- Returns:
- a builder representing the current node
-
atIndex
ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContext atIndex(java.lang.Integer index)
Defines the index the object is into theList
or array- Parameters:
index
- index- Returns:
- a builder representing the current node
-
addConstraintViolation
ConstraintValidatorContext addConstraintViolation()
Adds the newConstraintViolation
to be generated if the constraint validator mark the value as invalid.Methods of the
ConstraintViolationBuilder
instance this object comes from and the constraint violation builder nested objects throwIllegalStateException
after this call.- Returns:
ConstraintValidatorContext
instance theConstraintViolationBuilder
comes from
-
-