org.springmodules.validation.util.condition.date
Class AbstractDateCondition
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
- All Implemented Interfaces:
- Condition
- Direct Known Subclasses:
- IsAfterDateCondition, IsBeforeDateCondition, IsInTheFutureDateCondition, IsInThePastDateCondition
public abstract class AbstractDateCondition
- extends NonNullAcceptingTypeSpecificCondition
A base class for all date-time related conditions.
- Author:
- Uri Boness
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractDateCondition
protected AbstractDateCondition()
doCheck
public final boolean doCheck(Object object)
- See
Condition.check(Object)
.
This method casts or converts the given object to a Calendar
instance and
delegates the call to checkCalendar(java.util.Calendar)
.
- Specified by:
doCheck
in class AbstractCondition
- Parameters:
object
- The object to be checked.
- Returns:
true
if the given object adheres to this condition, false
otherwise.
- Throws:
IllegalArgumentException
- when the passed in object is either null
or of a type other than
Calendar
or Date
.
checkCalendar
protected abstract boolean checkCalendar(Calendar calendar)
- Checks this condition on the given calendar.
- Parameters:
calendar
- The calendar to be checks.
- Returns:
true
if checkCalendar passed, false
if the checkCalendar failed.
Copyright © 2009. All Rights Reserved.