Modifier and Type | Field and Description |
---|---|
protected State |
curState |
protected JointAction[] |
history |
protected int |
sIndex |
Constructor and Description |
---|
HistoryState(State curState,
int historySize) |
HistoryState(State curState,
JointAction[] history,
int sIndex) |
Modifier and Type | Method and Description |
---|---|
protected int |
arrayIndexForStepsBack(int ind) |
State |
copy()
Returns a copy of this state suitable for creating state transitions.
|
java.lang.Object |
get(java.lang.Object variableKey)
Returns the value for the given variable key.
|
HistoryState |
incrementWithChange(State newState,
JointAction lastAction) |
protected int |
keyIndex(java.lang.Object key) |
java.util.List<java.lang.Object> |
variableKeys()
Returns the list of state variable keys.
|
protected State curState
protected JointAction[] history
protected int sIndex
public HistoryState(State curState, int historySize)
public HistoryState(State curState, JointAction[] history, int sIndex)
public java.util.List<java.lang.Object> variableKeys()
State
variableKeys
in interface State
public java.lang.Object get(java.lang.Object variableKey)
State
public State copy()
State
DeepCopyState
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 HistoryState incrementWithChange(State newState, JointAction lastAction)
protected int keyIndex(java.lang.Object key)
protected int arrayIndexForStepsBack(int ind)