public class TigerState extends java.lang.Object implements MutableState
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
door |
| Constructor and Description |
|---|
TigerState() |
TigerState(java.lang.String door) |
| Modifier and Type | Method and Description |
|---|---|
TigerState |
copy()
Returns a copy of this state suitable for creating state transitions.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Object |
get(java.lang.Object variableKey)
Returns the value for the given variable key.
|
int |
hashCode() |
MutableState |
set(java.lang.Object variableKey,
java.lang.Object value)
Sets the value for the given variable key.
|
java.lang.String |
toString() |
java.util.List<java.lang.Object> |
variableKeys()
Returns the list of state variable keys.
|
public TigerState()
public TigerState(java.lang.String door)
public MutableState set(java.lang.Object variableKey, java.lang.Object value)
MutableStateset in interface MutableStatevariableKey - the key identifier for the variable value to changevalue - the variable value to which the variable should be set.public java.util.List<java.lang.Object> variableKeys()
StatevariableKeys in interface Statepublic java.lang.Object get(java.lang.Object variableKey)
Statepublic TigerState copy()
StateDeepCopyState or ShallowCopyState annotations. If it is a shallow copy, you should not *directly*
modify any fields of a copied state without copying the fields first, or it could contaminate the state from
which the copy was made. Alternatively, use the MutableState.set(Object, Object) method to modify
ShallowCopyState copied states,
which for ShallowCopyState instances should perform a safe copy-on-write operation.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object