Class State

  • All Implemented Interfaces:
    IState

    public class State
    extends Object
    implements IState
    The default IState implementation.
    • Method Detail

      • create

        public static IState create​(IState oldState,
                                    String name,
                                    Object value)
        Creates a new state instance.
        Parameters:
        oldState - the old state, can be null.
        name - the name, cannot be null.
        value - the value, cannot be null.
        Returns:
        the newly created state, never null.
      • create

        public static IState create​(String name,
                                    Object value)
        Creates a new state instance.
        Parameters:
        name - the name, cannot be null.
        value - the value, cannot be null.
        Returns:
        the newly created state, never null.
      • create

        public static IState create​(Map<String,​Object> stateMap)
        Creates a new state instance.
        Parameters:
        stateMap - the state map, cannot be null.
        Returns:
        the newly created state, never null.
      • getValue

        public Object getValue​(String name)
        Description copied from interface: IState
        Returns the value of the state by the specified name.
        Specified by:
        getValue in interface IState
        Parameters:
        name - the name, cannot be null.
        Returns:
        the value, can be null if there are no state value for the specified name.