org.apache.bval.constraints
Class FutureValidatorForDate
java.lang.Object
org.apache.bval.constraints.FutureValidatorForDate
- All Implemented Interfaces:
- ConstraintValidator<Future,Date>
public class FutureValidatorForDate
- extends Object
- implements ConstraintValidator<Future,Date>
Description: validate a date or calendar representing a date in the future
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FutureValidatorForDate
public FutureValidatorForDate()
initialize
public void initialize(Future annotation)
- Specified by:
initialize
in interface ConstraintValidator<Future,Date>
isValid
public boolean isValid(Date date,
ConstraintValidatorContext context)
- Specified by:
isValid
in interface ConstraintValidator<Future,Date>
now
protected Date now()
- overwrite when you need a different algorithm for 'now'.
- Returns:
- current date/time
Copyright © 2010-2012 Apache Software Foundation. All Rights Reserved.