State - A Java enumeration. The state for which the transition is assessed.OtherState - A Java enumeration. The state on which the decision is based.public class OtherStateTransitionCondition<State extends java.lang.Enum<State>,OtherState extends java.lang.Enum<OtherState>> extends AbstractTransitionCondition<State>
Defines a condition by which a transition between states is allowed depending on another state.
| Modifier and Type | Field and Description |
|---|---|
protected ControlledState<OtherState> |
otherState
The state on which the decision is based.
|
protected java.util.EnumSet<OtherState> |
values
The reference value for
otherState. |
| Constructor and Description |
|---|
OtherStateTransitionCondition(ControlledState<OtherState> otherState,
java.util.EnumSet<OtherState> values)
Constructs a transition condition that is satisfied when the other state provided has one of the given values.
|
OtherStateTransitionCondition(ControlledState<OtherState> otherState,
OtherState value)
Constructs a transition condition that is satisfied when the other state provided has the given value.
|
OtherStateTransitionCondition(ControlledState<OtherState> otherState,
OtherState value,
OtherState... additionalValues) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check(State s1,
State s2)
Indicates whether the condition for the provided transition is satisfied.
|
java.lang.String |
toString() |
and, impossibleTransitionCause, not, ortoStringNeedsParenthesesprotected ControlledState<OtherState extends java.lang.Enum<OtherState>> otherState
protected java.util.EnumSet<OtherState extends java.lang.Enum<OtherState>> values
otherState.public OtherStateTransitionCondition(ControlledState<OtherState> otherState, java.util.EnumSet<OtherState> values)
Constructs a transition condition that is satisfied when the other state provided has one of the given values.
java.lang.NullPointerException - is any argument is null.otherState - The state on which the decision is based.values - A set of values that the state must belong to.public OtherStateTransitionCondition(ControlledState<OtherState> otherState, OtherState value)
Constructs a transition condition that is satisfied when the other state provided has the given value.
java.lang.NullPointerException - is any argument is null.otherState - The state on which the decision is based.value - The value that the state must be equal to.public OtherStateTransitionCondition(ControlledState<OtherState> otherState, OtherState value, OtherState... additionalValues)
otherState - value - public boolean check(State s1, State s2)
TransitionConditionIndicates whether the condition for the provided transition is satisfied.
check in class TransitionCondition<State extends java.lang.Enum<State>>s1 - The start state of the transition, or null for transitions to s2 as an initial state.s2 - Then end state of the transition. Cannot be null.true if this condition allows a transition from s1 to s2.public java.lang.String toString()
toString in class java.lang.Object© Copyright IBM Corp. 1987, 2017