V
- The type of value to be validatedpublic final class ConstraintDisjunction<V> extends ConstraintAggregation<V>
ConstraintAggregation
implementation that
is disjunction of the encapsulated constraints. In other words this class
represents logical OR operator.constraints, type
Modifier and Type | Method and Description |
---|---|
<T> V |
validate(V value,
ValidationContext<T> context)
Checks whether the specified value conforms at least one of the
encapsulated constraints.
|
appendMessageArguments, getConstraints, getType
getMessageTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessageTemplate
public <T> V validate(V value, ValidationContext<T> context)
validate
in interface Constraint<V>
validate
in class ConstraintAggregation<V>
T
- The type of validated entity.value
- Value to be validated.context
- Validation context.ConstraintViolationException
- if the specified value not
conforms to all of the encapsulated constraints.Copyright © 2011–2020 FoxLabs. All rights reserved.