org.glassfish.pfl.basic.fsm
Enum State.Kind

java.lang.Object
  extended by java.lang.Enum<State.Kind>
      extended by 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.


Enum Constant Summary
FINAL
           
INITIAL
           
NORMAL
           
REFERENCE
           
 
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.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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
Method Detail

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.