com.ptc.windchill.upgrade.util.fsm
Class Not
java.lang.Object
com.ptc.windchill.upgrade.util.fsm.Not
- All Implemented Interfaces:
- Condition
- public final class Not
- extends Object
- implements Condition
A negating condition. If you have a Condition class, and you want it to evaluate to
an inverse result without creating a new Condition class, then wrap the instance in a Not.
Example
Condition my_cond = new MyCondition();
Condition my_neg_cond = new Not(my_cond)
- See Also:
Condition
Fields inherited from interface com.ptc.windchill.upgrade.util.fsm.Condition |
ALWAYS |
Constructor Summary |
Not(Condition condition)
Create an instance to negate an existing Condition. |
Method Summary |
boolean |
evaluate(State state)
Returns the inverse of the wrapped Condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
condition_
private final Condition condition_
Not
public Not(Condition condition)
- Create an instance to negate an existing Condition.
evaluate
public final boolean evaluate(State state)
throws Exception
- Returns the inverse of the wrapped Condition.
- Specified by:
evaluate
in interface Condition
- Throws:
Exception