public class State extends Coverable
Constructor and Description |
---|
State()
Creates a default state.
|
State(java.lang.String name)
Creates a named State.
|
Modifier and Type | Method and Description |
---|---|
State |
addTransition(Transition transition)
Adds a named exit Transition to this State.
|
Notice |
checkCompleteness(Notice topInfo,
Alphabet alphabet)
Checks the completeness of this State with respect to an Alphabet.
|
Transition |
getEnabled(Event event)
Returns the exit Transition whose name matches a given event.
|
java.lang.Boolean |
getInitial()
Optionally reports whether this is the initial State.
|
java.lang.String |
getName()
Returns the name of a State.
|
Transition |
getTransition(java.lang.String name)
Returns the unique exit Transition with the given name.
|
java.util.List<Transition> |
getTransitions()
Returns the list of exit Transitions for this State.
|
boolean |
isInitial()
Reports whether this is the initial State.
|
State |
setInitial(boolean value)
Sets whether this is a initial State.
|
State |
snapshot()
Takes a snapshot of this State, without its dependent Transitions.
|
isCovered, setCovered
equals, hashCode, setName, setName, toString
safeEquals, safeHashCode, semanticError
public State()
public State(java.lang.String name)
name
- the name of this State.public java.lang.String getName()
public State setInitial(boolean value)
value
- true, if this is a initial State.public java.lang.Boolean getInitial()
public boolean isInitial()
public State addTransition(Transition transition)
transition
- the transition to add.public Transition getTransition(java.lang.String name)
name
- the name of the Transition.public java.util.List<Transition> getTransitions()
public Transition getEnabled(Event event)
event
- the event.public State snapshot()
public Notice checkCompleteness(Notice topInfo, Alphabet alphabet)
topInfo
- the top-level Notice.alphabet
- the Alphabet of the associated Machine.