public class UniqueElementsValidator extends Object implements ConstraintValidator<UniqueElements,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(Collection collection,
ConstraintValidatorContext constraintValidatorContext) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize
public boolean isValid(Collection collection, ConstraintValidatorContext constraintValidatorContext)
isValid
in interface ConstraintValidator<UniqueElements,Collection>
collection
- the collection to validateconstraintValidatorContext
- context in which the constraint is evaluatedCopyright © 2007-2021 Red Hat, Inc. All Rights Reserved