com.ptc.windchill.upgrade.util.fsm
Class Not

java.lang.Object
  extended bycom.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

Field Summary
private  Condition 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
 

Field Detail

condition_

private final Condition condition_
Constructor Detail

Not

public Not(Condition condition)
Create an instance to negate an existing Condition.

Method Detail

evaluate

public final boolean evaluate(State state)
                       throws Exception
Returns the inverse of the wrapped Condition.

Specified by:
evaluate in interface Condition
Throws:
Exception