V
- The type of collection elementspublic final class CollectionElementConstraint<V> extends SequenceElementConstraint<Collection<V>,V>
SequenceElementConstraint
implementation
that performs validation of collection elements.ConstraintFactory.collectionElement(Constraint)
constraint
Modifier and Type | Method and Description |
---|---|
protected <T> Collection<V> |
doValidate(Collection<V> collection,
ValidationContext<T> context,
List<ConstraintViolationException> violations)
Checks whether all elements of the specified collection conforms to the
constraint of collection elements.
|
Class<?> |
getType()
Returns
java.util.Collection type. |
appendMessageArguments, getConstraint, validate
getMessageTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessageTemplate
public Class<?> getType()
java.util.Collection
type.java.util.Collection
type.protected <T> Collection<V> doValidate(Collection<V> collection, ValidationContext<T> context, List<ConstraintViolationException> violations)
doValidate
in class SequenceElementConstraint<Collection<V>,V>
T
- The type of validated entity.collection
- Collection whose elements to be checked.context
- Validation context.violations
- List of violations.Copyright © 2011–2020 FoxLabs. All rights reserved.