public interface MutableState extends State
Stateinterface extension for mutable states whose values can be directly modified. Requires implementing the method
set(Object, Object)so variable values for the input key can be set. If the
State.copy()method performs shallow copies, and the variable is a non-primitive data field, then the
set(Object, Object)method should perform a safe copy-on-write operation so that the
Stateobject from which the state was copied is not modified.
|Modifier and Type||Method and Description|
Sets the value for the given variable key.
MutableState set(java.lang.Object variableKey, java.lang.Object value)
variableKey- the key identifier for the variable value to change
value- the variable value to which the variable should be set.