public final class State7 extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static Integer |
TRANSITION_DEFINED_DEFAULT
Two (2) means the transition is defined in the default
state.
|
static Integer |
TRANSITION_DEFINED_LOCALLY
One (1) means the transition is defined in the current
state.
|
static Integer |
TRANSITION_UNDEFINED
Zero (0) means the transition is undefined.
|
Constructor and Description |
---|
State7(String name,
int id,
MethodHandle entry,
MethodHandle exit,
TransitionHandle[] transitions,
String[] transNames)
Creates a state instance with the given name and unique
integer identifier.
|
Modifier and Type | Method and Description |
---|---|
MethodHandle |
enterState()
Returns the state entry action.
|
MethodHandle |
exitState()
Returns the state exit action.
|
int |
getId()
Returns the unique integer identifier.
|
String |
getName()
Returns the state name.
|
String[] |
getTransitions()
Returns the state transition names.
|
String |
toString()
Returns the state name.
|
TransitionHandle |
transition(int transitionId)
Returns the transition method handle for the given
unique transition identifier.
|
public static final Integer TRANSITION_UNDEFINED
public static final Integer TRANSITION_DEFINED_LOCALLY
public static final Integer TRANSITION_DEFINED_DEFAULT
public State7(String name, int id, MethodHandle entry, MethodHandle exit, TransitionHandle[] transitions, String[] transNames)
name
- The state name.id
- The state unique identifier.entry
- state entry action method handle. Will be
null
if the state has no entry action.exit
- state exit action method handle. Will be
null
if the state has no exit action.transitions
- transition action method handles.transNames
- the transition names.public String toString()
public String getName()
public int getId()
public String[] getTransitions()
public TransitionHandle transition(int transitionId)
transitionId
- the unique transition identifier.public MethodHandle enterState()
null
if
the state has no entry action.public MethodHandle exitState()
null
if
the state has not exit action.Copyright © 2020. All rights reserved.