org.glassfish.pfl.basic.fsm
Enum State.Kind
java.lang.Object
java.lang.Enum<State.Kind>
org.glassfish.pfl.basic.fsm.State.Kind
- All Implemented Interfaces:
- Serializable, Comparable<State.Kind>
- Enclosing class:
- State
public static enum State.Kind
- extends Enum<State.Kind>
Kind of state. A StateEngine must have at least one INITIAL state.
An FSM may only be created in an INITIAL state.
It may have 0 or more FINAL states. A FINAL state may only be the
target of a state transition. If a state engine is used as a
submachine, it must have at least one final state.
A REFERENCE state is handled specially. It is used to call into
another state engine much as a normal subroutine call. A
REFERENCE state (like a FINAL state) may not have any transitions
that leave it. The returnAction method on a REFERENCE state is
responsible for setting the state directly.
|
Method Summary |
static State.Kind |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static State.Kind[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
INITIAL
public static final State.Kind INITIAL
NORMAL
public static final State.Kind NORMAL
REFERENCE
public static final State.Kind REFERENCE
FINAL
public static final State.Kind FINAL
values
public static State.Kind[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (State.Kind c : State.Kind.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static State.Kind valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
Copyright © 2013 Oracle. All Rights Reserved.