public final class SetNullConstraint extends CorrectConstraint<Object>
CorrectConstraint
implementation that
replaces a value with null
.SetNull
,
ConstraintFactory.setNull()
Modifier and Type | Field and Description |
---|---|
static SetNullConstraint |
DEFAULT
SetNullConstraint single instance. |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getType()
Returns
java.lang.Object type. |
<T> Object |
validate(Object value,
ValidationContext<T> context)
Returns
null . |
getMessageTemplate
appendMessageArguments
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
appendMessageArguments
public static final SetNullConstraint DEFAULT
SetNullConstraint
single instance.public Class<?> getType()
java.lang.Object
type.java.lang.Object
type.public <T> Object validate(Object value, ValidationContext<T> context)
null
.T
- The type of validated entity.value
- Any value.context
- Validation context.null
.Copyright © 2011–2020 FoxLabs. All rights reserved.