org.springmodules.validation.util.condition.date
Class IsBeforeDateCondition
java.lang.Object
org.springmodules.validation.util.condition.AbstractCondition
org.springmodules.validation.util.condition.TypeSpecificCondition
org.springmodules.validation.util.condition.NonNullAcceptingTypeSpecificCondition
org.springmodules.validation.util.condition.date.AbstractDateCondition
org.springmodules.validation.util.condition.date.IsBeforeDateCondition
- All Implemented Interfaces:
- Condition
public class IsBeforeDateCondition
- extends AbstractDateCondition
An AbstractDateCondition
implementation that checks
whether the checked calendar is chronologically before a specific calendar.
- Author:
- Uri Boness
Constructor Summary |
IsBeforeDateCondition(Calendar later)
Constructs a new IsBeforeDateCondition with a given calendar to be compared with the checked calendar. |
IsBeforeDateCondition(Date later)
Constructs a new IsBeforeDateCondition 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 before the calendar associated with this condition. |
Calendar |
getLater()
Returns the calendar associated with this condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IsBeforeDateCondition
public IsBeforeDateCondition(Date later)
- Constructs a new IsBeforeDateCondition with a given date to be compared with the checked calendar.
- Parameters:
later
- The date to be compared with the checked calendar.
IsBeforeDateCondition
public IsBeforeDateCondition(Calendar later)
- Constructs a new IsBeforeDateCondition with a given calendar to be compared with the checked calendar.
- Parameters:
later
- The calendar to be compared with the checked calendar.
checkCalendar
protected boolean checkCalendar(Calendar calendar)
- Checks whether the given calendar is chornologically before 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 before the calendar associated with this condition,
false
otherwise.
getLater
public Calendar getLater()
- Returns the calendar associated with this condition.
- Returns:
- The calendar associated with this condition.
Copyright © 2009. All Rights Reserved.