State - A Java enumeration.public class TableConditionalTransitionSystem<State extends java.lang.Enum<State>> extends ConditionalTransitionSystem<State>
Declares a conditional transition system where a distinct condition can be attached to each transition.
| Modifier and Type | Field and Description |
|---|---|
protected java.util.EnumMap<State,java.util.EnumMap<State,TransitionCondition<State>>> |
conditions
Conditions for the transitions between states.
|
protected java.util.EnumMap<State,TransitionCondition<State>> |
initialStateConditions
Conditions for the transitions to initial states.
|
explicitInitialStates, initialStates, possibleTransitionsstateClass| Constructor and Description |
|---|
TableConditionalTransitionSystem(java.lang.Class<State> stateClass)
Constructs a transition system for the states in the
State enumeration passed as a parameter to this class. |
| Modifier and Type | Method and Description |
|---|---|
TransitionCondition<State> |
getCondition(State s1,
State s2)
Returns the condition attached to the provided transition, or
null if no condition is attached to the provided transition. |
boolean |
hasCondition(State s1,
State s2)
Indicates whether a condition is attached to the provided transition.
|
TransitionCondition<State> |
setCondition(State s1,
State s2,
TransitionCondition<State> condition)
Attaches the provided condition to the specified transition.
|
checkCondition, computeInitialStates, conditionChanged, getCondition, getNextStates, impossibleTransitionCause, isPossibleTransitionaddInitialStates, addNextStates, dirtyInitialStates, getInitialStates, isInitialState, transitionExistscountNextStates, countPreviousStates, getAccessibleStates, getAccessibleStates, getFinalStates, getPreviousStates, getSelfAccessibleStates, isAccessible, isAccessible, isFinalStateprotected java.util.EnumMap<State extends java.lang.Enum<State>,TransitionCondition<State extends java.lang.Enum<State>>> initialStateConditions
public TableConditionalTransitionSystem(java.lang.Class<State> stateClass)
Constructs a transition system for the states in the State enumeration passed as a parameter to this class. Since type information
is not available at run-time for Java generic classes, the reflective Class object for the state enumeration
has to be provided to the constructor.
stateClass - The reflective object for the state enumeration.public boolean hasCondition(State s1, State s2)
ConditionalTransitionSystemIndicates whether a condition is attached to the provided transition.
hasCondition in class ConditionalTransitionSystem<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.true if a condition is attached to the provided transition.public TransitionCondition<State> getCondition(State s1, State s2)
ConditionalTransitionSystemReturns the condition attached to the provided transition, or null if no condition is attached to the provided transition.
getCondition in class ConditionalTransitionSystem<State extends java.lang.Enum<State>>s1 - The start state of the transition, or null when checking whether s2 is allowed as an initial state.s2 - Then end state of the transition. Cannot be null.null.public TransitionCondition<State> setCondition(State s1, State s2, TransitionCondition<State> condition)
Attaches the provided condition to the specified transition. If null is provided, detaches the previously attached condition,
if any. In all cases, the previously attached condition is returned.
java.lang.NullPointerException - if s2 is null.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.condition - A transition condition, or null.© Copyright IBM Corp. 1987, 2017