org.springmodules.validation.util.condition.date
Class IsAfterDateCondition

java.lang.Object
  extended by org.springmodules.validation.util.condition.AbstractCondition
      extended by org.springmodules.validation.util.condition.TypeSpecificCondition
          extended by org.springmodules.validation.util.condition.NonNullAcceptingTypeSpecificCondition
              extended by org.springmodules.validation.util.condition.date.AbstractDateCondition
                  extended by org.springmodules.validation.util.condition.date.IsAfterDateCondition
All Implemented Interfaces:
Condition

public class IsAfterDateCondition
extends AbstractDateCondition

An AbstractDateCondition implementation that checks whether the checked calendar is chronologically after a specific calendar.

Author:
Uri Boness

Constructor Summary
IsAfterDateCondition(Calendar earlier)
          Constructs a new IsAfterDateCondition with a given calendar to be compared with the checked calendar.
IsAfterDateCondition(Date earlier)
          Constructs a new IsAfterDateCondition with a given date to be compared with the checked calendar.
 
Method Summary
protected  boolean checkCalendar(Calendar calendar)
          Checks whether the given calendar is chornologically after the calendar associated with this condition.
 Calendar getEarlier()
          Returns the calendar associated with this condition.
 
Methods inherited from class org.springmodules.validation.util.condition.date.AbstractDateCondition
doCheck
 
Methods inherited from class org.springmodules.validation.util.condition.NonNullAcceptingTypeSpecificCondition
beforeObjectChecked
 
Methods inherited from class org.springmodules.validation.util.condition.AbstractCondition
afterObjectChecked, and, check, or
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IsAfterDateCondition

public IsAfterDateCondition(Date earlier)
Constructs a new IsAfterDateCondition with a given date to be compared with the checked calendar.

Parameters:
earlier - The date to be compared with the checked calendar.

IsAfterDateCondition

public IsAfterDateCondition(Calendar earlier)
Constructs a new IsAfterDateCondition with a given calendar to be compared with the checked calendar.

Parameters:
earlier - The calendar to be compared with the checked calendar.
Method Detail

checkCalendar

protected boolean checkCalendar(Calendar calendar)
Checks whether the given calendar is chornologically after the calendar associated with this condition.

Specified by:
checkCalendar in class AbstractDateCondition
Parameters:
calendar - The calendar to be checked.
Returns:
true if the given calender comes after the calendar associated with this condition, false otherwise.

getEarlier

public Calendar getEarlier()
Returns the calendar associated with this condition.

Returns:
The calendar associated with this condition.


Copyright © 2009. All Rights Reserved.