|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- The type of variable.public interface Var<E>
A fixed size variable that can be read and written to and from a store. The value of the variable can be set or gotten lazily, such that the value is not read or written immediately, the last value is returned or updated. The value of the variable can also be put or taken which will do a read and write immediately from the store and then return the value.
Method Summary | |
---|---|
E |
getValue()
Returns the value of this var as it was the last time this variable was read from a store at the location (and maybe with an offset) or as it was set with the setValue method. |
boolean |
putValue(E newValue)
Sets the value of this var and writes it to the store. |
void |
setValue(E newValue)
Sets the value of this var without writing the value to a store. |
E |
takeValue()
Returns the value of this var by reading it from the store and updating the cached value. |
Methods inherited from interface org.magnos.data.Data |
---|
copy, getActualLocation, getLocation, getParent, getSize, getStore, read, read, read, read, setLocation, setParent, setStore, write, write, write, write |
Method Detail |
---|
E getValue()
void setValue(E newValue)
newValue
- The new value to set.E takeValue()
boolean putValue(E newValue)
newValue
- The value to write to the store.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |