|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.smc.model.SmcElement
net.sf.smc.model.SmcMap
public final class SmcMap
SMC has states grouped into maps. This class contains
states
in a list and
stores the default state separately (if there is one).
SmcFSM
,
SmcState
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.smc.model.SmcElement |
---|
SmcElement.TransType |
Field Summary |
---|
Fields inherited from class net.sf.smc.model.SmcElement |
---|
_lineNumber, _name, NIL_STATE |
Constructor Summary | |
---|---|
SmcMap(java.lang.String name,
int lineNumber,
SmcFSM fsm)
Creates a state machine map with the given name, line number and finite state machine. |
Method Summary | |
---|---|
void |
accept(SmcVisitor visitor)
Calls the visitor's visit method for this finite state machine element. |
void |
addState(SmcState state)
Adds a state to the list. |
boolean |
findState(SmcState state)
Returns true if the state is in the list and
false otherwise. |
java.util.List<SmcState> |
getAllStates()
Returns all states in this map including the default state. |
SmcState |
getDefaultState()
Returns the default state. |
SmcFSM |
getFSM()
Returns the owning finite state machine. |
static int |
getNextStateId()
Returns the next unique state identifier. |
java.util.List<SmcState> |
getStates()
Returns the map's states. |
java.util.List<SmcTransition> |
getTransitions()
Returns all the transitions from all the states in this map. |
java.util.List<SmcTransition> |
getUndefinedDefaultTransitions()
Returns the list of transitions that do not appear in the default state. |
boolean |
hasDefaultState()
Returns true if this map has an explicitly
defined default state and false otherwise. |
boolean |
hasEntryActions()
Returns true if at least one of the map's states
has an entry action and false otherwise. |
boolean |
hasExitActions()
Returns true if at least one of the map's states
has an exit action and false otherwise. |
boolean |
isKnownState(java.lang.String stateName)
Returns true if this map contains the nsamed
state; false otherwise. |
java.lang.String |
toString()
Returns the map's text representation. |
Methods inherited from class net.sf.smc.model.SmcElement |
---|
getLineNumber, getName, merge |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SmcMap(java.lang.String name, int lineNumber, SmcFSM fsm)
Method Detail |
---|
public void accept(SmcVisitor visitor)
accept
in class SmcElement
visitor
- The visitor instance.SmcVisitor
public SmcFSM getFSM()
public java.util.List<SmcState> getStates()
public boolean findState(SmcState state)
true
if the state is in the list and
false
otherwise.
true
if the state is in the list and
false
otherwise.public boolean isKnownState(java.lang.String stateName)
true
if this map contains the nsamed
state; false
otherwise.
true
if this map contains the nsamed
state; false
otherwise.public boolean hasDefaultState()
true
if this map has an explicitly
defined default state and false
otherwise.
true
if this map has an explicitly
defined default state and false
otherwise.public SmcState getDefaultState()
null
.
public java.util.List<SmcState> getAllStates()
public java.util.List<SmcTransition> getTransitions()
public java.util.List<SmcTransition> getUndefinedDefaultTransitions()
public boolean hasEntryActions()
true
if at least one of the map's states
has an entry action and false
otherwise.
true
if at least one of the map's states
has an entry action and false
otherwise.public boolean hasExitActions()
true
if at least one of the map's states
has an exit action and false
otherwise.
true
if at least one of the map's states
has an exit action and false
otherwise.public static int getNextStateId()
public void addState(SmcState state)
state
- an FSM state.public java.lang.String toString()
toString
in class java.lang.Object
|
SMC 6_0_1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |