|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
"A state that has substates - that is, nested states - is called a composite state" - Booch et al, The UML User Guide.
This adds the notion of hierarchy to state machines. A composite state can also be regarded as a state machine itself.
Method Summary | |
void |
addState(State state)
Adds a substate to this state. |
boolean |
contains(State state)
Checks (recursively) wether the composite state or one of it's substates does have state as a substate. |
InitialState |
getInitialState()
Returns the initial substate of the composite state. |
Set |
getStates()
Returns all substates of the composite state. |
void |
removeState(State state)
Removes a substate from this state. |
void |
setInitialState(InitialState initial)
Sets the initial substate of the composite state. |
Methods inherited from interface de.fhg.igd.jhsm.State |
addDeferred, addTransition, defers, entry, exit, getDeferred, getTransitions, removeDeferred, removeTransition, setEntry, setExit |
Methods inherited from interface de.fhg.igd.jhsm.Component |
action, getAction, getName, getParent, setAction, setName, setParent |
Method Detail |
public void addState(State state)
state
- The state that should be nested.public void removeState(State state)
state
- The state that should be removed.public InitialState getInitialState()
public void setInitialState(InitialState initial)
public Set getStates()
public boolean contains(State state)
state
as a substate.
state
- The state that is the substate in question.
true
if the given state is contained in the
composite state, false
else.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |