com.ptc.windchill.upgrade.util.fsm
Class And
java.lang.Object
com.ptc.windchill.upgrade.util.fsm.And
- All Implemented Interfaces:
- Condition
- public final class And
- extends Object
- implements Condition
A logical AND'ing condition. If you have two condition instances, an instance
of this class will return true if both of them are true.
Behavior is short circuiting. So if the first condition is false, the second
will not be evaluated.
Example
Condition cond1 = new FirstCondition();
Condition cond2 = new SecondCondition();
Condition ored_cond = new And(cond1, cond2)
- See Also:
Condition
Fields inherited from interface com.ptc.windchill.upgrade.util.fsm.Condition |
ALWAYS |
Method Summary |
boolean |
evaluate(State state)
True if both of the two wrapped conditions evaluate 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_
conditionC_
private Condition conditionC_
And
public And(Condition condition_a,
Condition condition_b)
- Create an instance to logically AND the two provided conditions.
And
public And(Condition condition_a,
Condition condition_b,
Condition condition_c)
evaluate
public final boolean evaluate(State state)
throws Exception
- True if both of the two wrapped conditions evaluate to true.
- Specified by:
evaluate
in interface Condition
- Throws:
Exception