public class UniqueElementsValidator extends java.lang.Object implements javax.validation.ConstraintValidator<UniqueElements,java.util.Collection>
Uniqueness is defined by the equals()
method of the objects being compared.
Constructor and Description |
---|
UniqueElementsValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(java.util.Collection collection,
javax.validation.ConstraintValidatorContext constraintValidatorContext) |
public boolean isValid(java.util.Collection collection, javax.validation.ConstraintValidatorContext constraintValidatorContext)
isValid
in interface javax.validation.ConstraintValidator<UniqueElements,java.util.Collection>
collection
- the collection to validateconstraintValidatorContext
- context in which the constraint is evaluatedCopyright © 2007-2022 Red Hat, Inc. All Rights Reserved