public final class State7
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
TRANSITION_DEFINED_DEFAULT
Two (2) means the transition is defined in the default
state.
|
static java.lang.Integer |
TRANSITION_DEFINED_LOCALLY
One (1) means the transition is defined in the current
state.
|
static java.lang.Integer |
TRANSITION_UNDEFINED
Zero (0) means the transition is undefined.
|
Constructor and Description |
---|
State7(java.lang.String name,
int id,
java.lang.invoke.MethodHandle entry,
java.lang.invoke.MethodHandle exit,
TransitionHandle[] transitions,
java.lang.String[] transNames)
Creates a state instance with the given name and unique
integer identifier.
|
Modifier and Type | Method and Description |
---|---|
java.lang.invoke.MethodHandle |
enterState()
Returns the state entry action.
|
java.lang.invoke.MethodHandle |
exitState()
Returns the state exit action.
|
int |
getId()
Returns the unique integer identifier.
|
java.lang.String |
getName()
Returns the state name.
|
java.lang.String[] |
getTransitions()
Returns the state transition names.
|
java.lang.String |
toString()
Returns the state name.
|
TransitionHandle |
transition(int transitionId)
Returns the transition method handle for the given
unique transition identifier.
|
public static final java.lang.Integer TRANSITION_UNDEFINED
public static final java.lang.Integer TRANSITION_DEFINED_LOCALLY
public static final java.lang.Integer TRANSITION_DEFINED_DEFAULT
public State7(java.lang.String name, int id, java.lang.invoke.MethodHandle entry, java.lang.invoke.MethodHandle exit, TransitionHandle[] transitions, java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public int getId()
public java.lang.String[] getTransitions()
public TransitionHandle transition(int transitionId)
transitionId
- the unique transition identifier.public java.lang.invoke.MethodHandle enterState()
null
if
the state has no entry action.public java.lang.invoke.MethodHandle exitState()
null
if
the state has not exit action.Copyright © 2015. Charles W. Rapp. All Rights Reserved. Use is subject to license terms.