org.apache.bval.constraints
Class FutureValidatorForDate

java.lang.Object
  extended by 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


Constructor Summary
FutureValidatorForDate()
           
 
Method Summary
 void initialize(Future annotation)
           
 boolean isValid(Date date, ConstraintValidatorContext context)
           
protected  Date now()
          overwrite when you need a different algorithm for 'now'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FutureValidatorForDate

public FutureValidatorForDate()
Method Detail

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-2014 The Apache Software Foundation. All Rights Reserved.