Interface IWritableState


  • public interface IWritableState
    A state container which can be written to. It is an hierarchical structure that can contain named child states. Actual data values are stored in named attributes for each state node.

    This interface is a companion to IState which handles reading of state information. IStateful can be used to mark a class that knows how to store its state in an IWritableState instance.

    • Method Detail

      • createChild

        IWritableState createChild​(String type)
        Creates a new child node. Multiple nodes of the same type are permitted.
        Parameters:
        type - node type
        Returns:
        a new child node
      • putString

        void putString​(String key,
                       String value)
        Stores a named attribute value. Multiple values with the same key is not supported. If called multiple times with the same key then only the latest value should be kept.
        Parameters:
        key - attribute key
        value - attribute value