Interface DataState
-
- All Known Implementing Classes:
AbstractDataStateImpl
public interface DataStateStores the values of a fixed number of variables that are of the types Long or Double.- Author:
- F. Mannhardt
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcapacity()voidclear()Set all variables to unsetbooleancontains(int varIdx)DataStatedeepCopy()doublegetDouble(int varIdx)longgetLong(int varIdx)booleanisEmpty()DataStatemakeStateImmutable()voidputDouble(int varIdx, double value)voidputLong(int varIdx, long value)intsize()java.lang.DoubletryGetDouble(int varIdx)java.lang.LongtryGetLong(int varIdx)voidupdate(DataState dataEffect)Updates the values of this instance with the non-null ones in the supplied one.
-
-
-
Method Detail
-
putDouble
void putDouble(int varIdx, double value)
-
putLong
void putLong(int varIdx, long value)
-
getLong
long getLong(int varIdx)
-
getDouble
double getDouble(int varIdx)
-
tryGetDouble
java.lang.Double tryGetDouble(int varIdx)
-
tryGetLong
java.lang.Long tryGetLong(int varIdx)
-
contains
boolean contains(int varIdx)
-
isEmpty
boolean isEmpty()
-
capacity
int capacity()
-
size
int size()
-
clear
void clear()
Set all variables to unset
-
update
void update(DataState dataEffect)
Updates the values of this instance with the non-null ones in the supplied one.- Parameters:
dataEffect-
-
makeStateImmutable
DataState makeStateImmutable()
- Returns:
- an immutable version of this state (might return a clone or the original)
-
deepCopy
DataState deepCopy()
-
-