org.springmodules.validation.util.condition.date.jodatime
Class AbstractInstantCondition

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.jodatime.AbstractInstantCondition
All Implemented Interfaces:
Condition
Direct Known Subclasses:
IsAfterInstantCondition, IsBeforeInstantCondition, IsInTheFutureInstantCondition, IsInThePastInstantCondition

public abstract class AbstractInstantCondition
extends NonNullAcceptingTypeSpecificCondition

A base class for all joda-time date related conditions.

Author:
Uri Boness

Constructor Summary
protected AbstractInstantCondition()
          Constructs a new AbstractInstantCondition.
 
Method Summary
protected abstract  boolean checkInstant(org.joda.time.ReadableInstant instant)
           
 boolean doCheck(Object object)
          See AbstractCondition.doCheck(Object).
 
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

AbstractInstantCondition

protected AbstractInstantCondition()
Constructs a new AbstractInstantCondition.

Method Detail

doCheck

public final boolean doCheck(Object object)
See AbstractCondition.doCheck(Object).

Casts the given object to a ReadableInstant and delegates the call to checkInstant(org.joda.time.ReadableInstant).

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.

checkInstant

protected abstract boolean checkInstant(org.joda.time.ReadableInstant instant)


Copyright © 2009. All Rights Reserved.