public class State extends NameBase
Modifier and Type | Class and Description |
---|---|
static class |
State.Kind
Kind of state.
|
Constructor and Description |
---|
State(Set<State> states,
String name) |
State(Set<State> states,
String name,
State.Kind kind) |
State(String name) |
State(String name,
State.Kind kind) |
Modifier and Type | Method and Description |
---|---|
Action |
getDefaultAction()
Get the default transition action that is used if the default next
state is used.
|
State |
getDefaultNextState()
Return the default next state for this state.
|
Map<Input,Set<Transition>> |
getInputMap() |
State.Kind |
getKind()
Return the Kind of this state.
|
void |
postAction(FSM fsm)
Method that defines action that occurs whenever this state is exited,
that is, when the state is changed from this state to a new state.
|
FSM |
preAction(FSM fsm)
Method that defines action that occurs whenever this state is entered
from a different state.
|
State |
returnAction(FSM fsm,
FSM nestedFSM)
If this state has Kind REFERENCE, and its preAction pushes a
nested FSM onto the stack, the returnAction method is called after the
nested FSM reaches a final state.
|
public State(String name)
public State(String name, State.Kind kind)
public State(Set<State> states, String name, State.Kind kind)
public State.Kind getKind()
public FSM preAction(FSM fsm)
Any exceptions except ThreadDeath thrown by this method are ignored. This method can be overridden in a state implementation if needed.
public State returnAction(FSM fsm, FSM nestedFSM)
If the returnAction method sets the state to a new state, the postAction method is called as usuTransition.
Any exceptions except ThreadDeath thrown by this method are ignored. This method can be overridden in a state implementation if needed.
public void postAction(FSM fsm)
Any exceptions except ThreadDeath thrown by this method are ignored. This method can be overridden in a state implementation if needed.
public State getDefaultNextState()
public Action getDefaultAction()
public Map<Input,Set<Transition>> getInputMap()
Copyright © 2017 Oracle. All rights reserved.