Uniqueness is defined by the equals() method of the objects being compared.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private List | |
| public boolean | Returns: true if the input collection is null or does not contain duplicate elementsthe collection to validate collection, ConstraintValidatorContext context in which the constraint is evaluated constraintValidatorContext)Implements jakarta. |
| UniqueElementsValidator | back to summary |
|---|---|
| public UniqueElementsValidator() | |
| findDuplicates | back to summary |
|---|---|
| private List | |
| isValid | back to summary |
|---|---|
| public boolean isValid(Collection<E> collection, ConstraintValidatorContext constraintValidatorContext) Implements jakarta. Doc from jakarta. Implements the validation logic.
The state of This method can be accessed concurrently, thread-safety must be ensured by the implementation.
| |