Constructor and Description |
---|
StateImpl() |
StateImpl(String name) |
StateImpl(String name,
boolean isEndState) |
StateImpl(String name,
boolean isEndState,
boolean isBlocking) |
StateImpl(String name,
Map<String,Transition<T>> transitions,
boolean isEndState) |
StateImpl(String name,
Map<String,Transition<T>> transitions,
boolean isEndState,
boolean isBlocking) |
Modifier and Type | Method and Description |
---|---|
void |
addTransition(String event,
State<T> next)
Add a deterministic Transition with no Action
|
void |
addTransition(String event,
State<T> next,
Action<T> action)
Add a deterministic Transition with an Action
|
void |
addTransition(String event,
Transition<T> transition)
Add a
Transition |
String |
getName()
Name of the State.
|
Transition<T> |
getTransition(String event)
Returns the Transition for an Event
|
Map<String,Transition<T>> |
getTransitions() |
boolean |
isBlocking()
Whether this is a Blocking State.
|
boolean |
isEndState()
Whether this State is an End State
|
void |
removeTransition(String event)
Remove a Transition from the State
|
void |
setBlocking(boolean isBlocking)
Set whether or not this is a Blocking State
|
void |
setEndState(boolean isEndState) |
void |
setName(String name) |
void |
setTransitions(Map<String,Transition<T>> transitions) |
String |
toString() |
public StateImpl()
public StateImpl(String name)
public StateImpl(String name, boolean isEndState)
public StateImpl(String name, boolean isEndState, boolean isBlocking)
public StateImpl(String name, Map<String,Transition<T>> transitions, boolean isEndState)
public StateImpl(String name, Map<String,Transition<T>> transitions, boolean isEndState, boolean isBlocking)
public String getName()
State
public void setName(String name)
public Transition<T> getTransition(String event)
State
getTransition
in interface State<T>
event
- The eventpublic Map<String,Transition<T>> getTransitions()
public void setTransitions(Map<String,Transition<T>> transitions)
public boolean isEndState()
State
isEndState
in interface State<T>
public void setEndState(boolean isEndState)
public void addTransition(String event, State<T> next)
State
addTransition
in interface State<T>
event
- The event to add the Transition
next
- The next Statepublic void addTransition(String event, State<T> next, Action<T> action)
State
addTransition
in interface State<T>
event
- The event to add the Transition
next
- The next Stateaction
- The resulting Action
public void addTransition(String event, Transition<T> transition)
State
Transition
addTransition
in interface State<T>
event
- The event to add the Transition
transition
- The Transition
public void removeTransition(String event)
State
removeTransition
in interface State<T>
event
- Remove the transition for this Eventpublic void setBlocking(boolean isBlocking)
State
setBlocking
in interface State<T>
isBlocking
- if true, then this is a blocking Statepublic boolean isBlocking()
State
isBlocking
in interface State<T>
Copyright © 2016. All rights reserved.