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