org.springmodules.validation.util.condition.common
Class NotCondition
java.lang.Object
org.springmodules.validation.util.condition.AbstractCondition
org.springmodules.validation.util.condition.common.NotCondition
- All Implemented Interfaces:
- Condition
public class NotCondition
- extends AbstractCondition
A condition that represents a logical NOT
of another condition.
- Author:
- Uri Boness
Constructor Summary |
NotCondition(Condition condition)
Constructs a new NotCondition with the condition to reverse. |
Method Summary |
boolean |
doCheck(Object object)
Checks and reverses the associated condition on the given object. |
Condition |
getCondition()
Returns the reverse condition associated with this condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NotCondition
public NotCondition(Condition condition)
- Constructs a new NotCondition with the condition to reverse.
- Parameters:
condition
- The condition to reverse.
doCheck
public boolean doCheck(Object object)
- Checks and reverses the associated condition on the given object.
- Specified by:
doCheck
in class AbstractCondition
- Parameters:
object
- The object to be checked.
- Returns:
true
if the associated condition returns false
, false
otherwise.
getCondition
public Condition getCondition()
- Returns the reverse condition associated with this condition.
- Returns:
- The reverse condition associated with this condition.
Copyright © 2009. All Rights Reserved.