Package jakarta.validation
Interface ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeContextBuilder
-
- Enclosing interface:
- ConstraintValidatorContext.ConstraintViolationBuilder
public static interface ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeContextBuilderRepresents refinement choices for a node which is in an iterable, e.g. array,IterableorMap.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 ConstraintValidatorContextaddConstraintViolation()Adds the newConstraintViolationto be generated if the constraint validator mark the value as invalid.ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContextatIndex(Integer index)Defines the index the object is into theListor arrayConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContextatKey(Object key)Defines the key the object is into theMap.
-
-
-
Method Detail
-
atKey
ConstraintValidatorContext.ConstraintViolationBuilder.LeafNodeBuilderDefinedContext atKey(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(Integer index)
Defines the index the object is into theListor array- Parameters:
index- index- Returns:
- a builder representing the current node
-
addConstraintViolation
ConstraintValidatorContext addConstraintViolation()
Adds the newConstraintViolationto be generated if the constraint validator mark the value as invalid.Methods of the
ConstraintViolationBuilderinstance this object comes from and the constraint violation builder nested objects throwIllegalStateExceptionafter this call.- Returns:
ConstraintValidatorContextinstance theConstraintViolationBuildercomes from
-
-