Class UniqueElementsValidator

java.lang.Object
org.hibernate.validator.internal.constraintvalidators.hv.UniqueElementsValidator
All Implemented Interfaces:
ConstraintValidator<UniqueElements,Collection>

public class UniqueElementsValidator extends Object implements ConstraintValidator<UniqueElements,Collection>
Validates that the provided collection only contains unique elements, i.e. that we can't find 2 equal elements in the collection.

Uniqueness is defined by the equals() method of the objects being compared.

Author:
Tadhg Pearson, Guillaume Smet
  • Constructor Details

    • UniqueElementsValidator

      public UniqueElementsValidator()
  • Method Details