State - A Java enumeration.public class SingleConditionTransitionSystem<State extends java.lang.Enum<State>> extends ConditionalTransitionSystem<State>
Declares a conditional transition system where all the transitions have the same condition attached.
| Modifier and Type | Field and Description |
|---|---|
protected TransitionCondition<State> |
condition
The condition attached to all transitions.
|
explicitInitialStates, initialStates, possibleTransitionsstateClass| Constructor and Description |
|---|
SingleConditionTransitionSystem(java.lang.Class<State> stateClass)
Constructs a transition system for the states in the
State enumeration passed as a parameter to this class. |
SingleConditionTransitionSystem(java.lang.Class<State> stateClass,
TransitionCondition<State> condition)
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()
Returns the condition attached to all transitions, or
null is no condition is attached. |
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. |
TransitionCondition<State> |
setCondition(TransitionCondition<State> condition)
Attaches the provided condition to all transitions.
|
checkCondition, computeInitialStates, conditionChanged, getCondition, getNextStates, hasCondition, impossibleTransitionCause, isPossibleTransitionaddInitialStates, addNextStates, dirtyInitialStates, getInitialStates, isInitialState, transitionExistscountNextStates, countPreviousStates, getAccessibleStates, getAccessibleStates, getFinalStates, getPreviousStates, getSelfAccessibleStates, isAccessible, isAccessible, isFinalStateprotected TransitionCondition<State extends java.lang.Enum<State>> condition
The condition attached to all transitions.
public SingleConditionTransitionSystem(java.lang.Class<State> stateClass)
Constructs a transition system for the states in the State enumeration passed as a parameter to this class. No condition is provided
to this constructor; it can be provided later with the setCondition(TransitionCondition) method.
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 SingleConditionTransitionSystem(java.lang.Class<State> stateClass, TransitionCondition<State> condition)
Constructs a transition system for the states in the State enumeration passed as a parameter to this class. The condition provided
is attached to all transitions.
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 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> getCondition()
Returns the condition attached to all transitions, or null is no condition is attached.
null.getCondition(State, State)public TransitionCondition<State> setCondition(TransitionCondition<State> condition)
Attaches the provided condition to all transitions. If null is provided, detaches the previously attached condition, if any.
In all cases, the previously attached condition is returned.
condition - A transition condition, or null.© Copyright IBM Corp. 1987, 2017