public final class IsTrueConstraint extends CheckConstraint<Boolean>
CheckConstraint
implementation that checks
whether a boolean value is true
.IsTrue
,
ConstraintFactory.isTrue()
Modifier and Type | Field and Description |
---|---|
static IsTrueConstraint |
DEFAULT
IsTrueConstraint single instance. |
Modifier and Type | Method and Description |
---|---|
protected <T> boolean |
check(Boolean value,
ValidationContext<T> context)
Checks whether the specified boolean value is
true . |
Class<?> |
getType()
Returns
java.lang.Boolean type. |
validate
appendMessageArguments, getMessageTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendMessageArguments, getMessageTemplate
public static final IsTrueConstraint DEFAULT
IsTrueConstraint
single instance.public Class<?> getType()
java.lang.Boolean
type.java.lang.Boolean
type.protected <T> boolean check(Boolean value, ValidationContext<T> context)
true
.check
in class CheckConstraint<Boolean>
T
- The type of validated entity.value
- Boolean value to be checked for true
.context
- Validation context.true
if the specified boolean value is
true
; false
otherwise.Copyright © 2011–2020 FoxLabs. All rights reserved.