public interface StateMap
Provides a representation of a component's state at some point in time.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value associated with the given key nGet state version is not guaranteed to be numeric, but can be used to compare against an expected version.toMap()
Returns an immutable Map representation of all keys and values for the state of a component.
-
Method Details
-
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
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
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.
-