Interface StateMap


public interface StateMap
Provides a representation of a component's state at some point in time.
  • Method Summary

    Modifier and Type
    Method
    Description
    get(String key)
    Returns the value associated with the given key n
    Get state version is not guaranteed to be numeric, but can be used to compare against an expected version.
    Returns an immutable Map representation of all keys and values for the state of a component.
  • Method Details

    • getStateVersion

      Optional<String> getStateVersion()
      Get state version is not guaranteed to be numeric, but can be used to compare against an expected version. The default implementation uses the available version number and considers -1 as indicating an empty version
      Returns:
      State version or empty when not known
    • get

      String get(String key)
      Returns the value associated with the given key n
      Parameters:
      key - the key whose value should be retrieved
      Returns:
      the value associated with the given key, or null if no value is associated with this key.
    • toMap

      Map<String,String> toMap()
      Returns an immutable Map representation of all keys and values for the state of a component.
      Returns:
      an immutable Map representation of all keys and values for the state of a component.