public class DynamicLocation<T> extends NamedLocation<T> implements Named
base, DIRECT_ON_SET, INDIRECT_FLUIDS, value
FUNCTION
Constructor and Description |
---|
DynamicLocation(Symbol name,
java.lang.Object property) |
Modifier and Type | Method and Description |
---|---|
T |
get()
Get the current value of this location.
|
T |
get(T defaultValue) |
static DynamicLocation |
getInstance(Symbol name,
java.lang.Object property)
For a given (Symbol.
|
NamedLocation<T> |
getLocation()
Get the thread-specific Location for this Location.
|
java.lang.String |
getName() |
java.lang.Object |
getSymbol() |
boolean |
isBound() |
void |
set(T value) |
void |
setName(java.lang.String name) |
void |
setRestore(java.lang.Object oldValue)
Restore an old value.
|
java.lang.Object |
setWithSave(T newValue)
Set a value, but return cookie so old value can be restored.
|
void |
undefine() |
entered, equals, getEnvironment, getKey, getKeyProperty, getKeySymbol, hashCode, matches, matches
getBase, getBaseForce, isConstant, setAlias, setBase
define, getValue, make, make, make, print, setValue, toString
public DynamicLocation(Symbol name, java.lang.Object property)
public NamedLocation<T> getLocation()
public java.lang.Object setWithSave(T newValue)
Location
setWithSave
in class NamedLocation<T>
public void setRestore(java.lang.Object oldValue)
Location
setRestore
in class NamedLocation<T>
oldValue
- the return value from a prior setWithSave.public void undefine()
undefine
in class IndirectableLocation<T>
public static DynamicLocation getInstance(Symbol name, java.lang.Object property)