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