com.ptc.windchill.upgrade.util.fsm
Class Or
java.lang.Object
com.ptc.windchill.upgrade.util.fsm.Or
- All Implemented Interfaces:
- Condition
- public final class Or
- extends Object
- implements Condition
A logical OR'ing condition. If you have two condition instances, an instance
of this class will return true if at least one them is true.
Behavior is short circuiting. So if the first condition is true, the second
will not be evaluated.
Example
Condition cond1 = new FirstCondition();
Condition cond2 = new SecondCondition();
Condition ored_cond = new Or(cond1, cond2)
- See Also:
Condition
Fields inherited from interface com.ptc.windchill.upgrade.util.fsm.Condition |
ALWAYS |
Constructor Summary |
Or(Condition condition_a,
Condition condition_b)
Create an instance to logically OR the two provided conditions. |
Method Summary |
boolean |
evaluate(State state)
True if at least one of the two wrapped conditions evaluates to true. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
conditionA_
private final Condition conditionA_
conditionB_
private final Condition conditionB_
Or
public Or(Condition condition_a,
Condition condition_b)
- Create an instance to logically OR the two provided conditions.
evaluate
public final boolean evaluate(State state)
throws Exception
- True if at least one of the two wrapped conditions evaluates to true.
- Specified by:
evaluate
in interface Condition
- Throws:
Exception