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>, java.lang.constant.Constable
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 Details

  • Constructor Details

    • Kind

      private Kind()
  • Method Details

    • values

      public static State.Kind[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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