State - A Java enumeration.public abstract class AbstractTransitionCondition<State extends java.lang.Enum<State>> extends TransitionCondition<State>
Defines a condition by which a transition between states is allowed. This class provides the methods to build compound conditions, such as
conjunctions or disjunction. It leaves only the TransitionCondition.check(State, State) method to be defined.
| Constructor and Description |
|---|
AbstractTransitionCondition() |
| Modifier and Type | Method and Description |
|---|---|
TransitionCondition<State> |
and(TransitionCondition<State>... conjuncts)
Returns a condition that is logically equivalent to the conjunction of this condition and the provided ones.
|
TransitionCondition<State> |
impossibleTransitionCause(State s1,
State s2)
Returns the part of this condition that causes the provided transition to be impossible.
|
TransitionCondition<State> |
not()
Returns a condition that is logically equivalent to the negation of this condition.
|
TransitionCondition<State> |
or(TransitionCondition<State>... disjuncts)
Returns a condition that is logically equivalent to the disjunction of this condition and the provided ones.
|
check, toStringNeedsParenthesespublic TransitionCondition<State> impossibleTransitionCause(State s1, State s2)
TransitionConditionReturns the part of this condition that causes the provided transition to be impossible.
Note: This method assumes that the provided transition is indeed not allowed by this condition. It does not test it. Unspecified result is returned if this method is called on a transition that is allowed by this condition.
impossibleTransitionCause in class TransitionCondition<State extends java.lang.Enum<State>>s1 - The start state of the transition, or null when checking whether s2 is an allowed initial state.s2 - Then end state of the transition. Cannot be null.TransitionCondition that is not satisfied, which causes the provided transition to be impossible.public TransitionCondition<State> not()
TransitionConditionReturns a condition that is logically equivalent to the negation of this condition. No assumption should be made on whether this
condition or a new instance of TransitionCondition is returned.
not in class TransitionCondition<State extends java.lang.Enum<State>>public TransitionCondition<State> and(TransitionCondition<State>... conjuncts)
TransitionConditionReturns a condition that is logically equivalent to the conjunction of this condition and the provided ones.
No assumption should be made on whether this condition or a new instance of TransitionCondition is returned.
and in class TransitionCondition<State extends java.lang.Enum<State>>conjuncts - Zero or more transition conditions.public TransitionCondition<State> or(TransitionCondition<State>... disjuncts)
TransitionConditionReturns a condition that is logically equivalent to the disjunction of this condition and the provided ones.
No assumption should be made on whether this condition or a new instance of TransitionCondition is returned.
or in class TransitionCondition<State extends java.lang.Enum<State>>disjuncts - Zero or more transition conditions.© Copyright IBM Corp. 1987, 2017