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

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
                  extended by org.springmodules.validation.util.condition.date.jodatime.IsAfterInstantCondition
All Implemented Interfaces:
Condition

public class IsAfterInstantCondition
extends AbstractInstantCondition

An AbstractInstantCondition implementation that checks whether the checked instant comes chronologically after another instant.

Author:
Uri Boness

Constructor Summary
IsAfterInstantCondition(Calendar earlier)
          Constructs a new IsAfterDateCondition with a given calendar to be checked against.
IsAfterInstantCondition(Date earlier)
          Constructs a new IsAfterDateCondition with a given date to be checked against.
IsAfterInstantCondition(org.joda.time.ReadableInstant earlier)
          Constructs a new IsAfterDateCondition with a given instant to be checked against.
 
Method Summary
protected  boolean checkInstant(org.joda.time.ReadableInstant instant)
          Checks whether the given instant comes chronologically after the instant associated with this instantCondition.
 org.joda.time.ReadableInstant getEarlier()
          Returns the instant associated with this condition.
 
Methods inherited from class org.springmodules.validation.util.condition.date.jodatime.AbstractInstantCondition
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

IsAfterInstantCondition

public IsAfterInstantCondition(org.joda.time.ReadableInstant earlier)
Constructs a new IsAfterDateCondition with a given instant to be checked against.

Parameters:
earlier - The instant that this instantCondition will checkCalendar against.

IsAfterInstantCondition

public IsAfterInstantCondition(Date earlier)
Constructs a new IsAfterDateCondition with a given date to be checked against.

Parameters:
earlier - The date that this instantCondition will checkCalendar against.

IsAfterInstantCondition

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

Parameters:
earlier - The calendar that this instantCondition will checkCalendar against.
Method Detail

checkInstant

protected boolean checkInstant(org.joda.time.ReadableInstant instant)
Checks whether the given instant comes chronologically after the instant associated with this instantCondition.

Specified by:
checkInstant in class AbstractInstantCondition
Parameters:
instant - The instance to be checked.
Returns:
true if the given instant comes after the instant associated with this instantCondition, false otherwise.

getEarlier

public org.joda.time.ReadableInstant getEarlier()
Returns the instant associated with this condition.

Returns:
The instant associated with this condition.


Copyright © 2009. All Rights Reserved.