Package gnu.mapping
Class DynamicLocation<T>
java.lang.Object
gnu.mapping.Location<T>
gnu.mapping.IndirectableLocation<T>
gnu.mapping.NamedLocation<T>
gnu.mapping.DynamicLocation<T>
- All Implemented Interfaces:
EnvironmentKey
,Named
,Map.Entry<EnvironmentKey,
T>
A Location that forwards to a thread-specific Location.
-
Field Summary
Fields inherited from class gnu.mapping.IndirectableLocation
base, DIRECT_ON_SET, INDIRECT_FLUIDS, value
Fields inherited from interface gnu.mapping.EnvironmentKey
FUNCTION
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()
Get the current value of this location.static DynamicLocation
getInstance
(Symbol name, Object property) For a given (Symbol.Get the thread-specific Location for this Location.getName()
boolean
isBound()
void
void
void
setRestore
(Object oldValue) Restore an old value.setWithSave
(T newValue) Set a value, but return cookie so old value can be restored.void
undefine()
Methods inherited from class gnu.mapping.NamedLocation
entered, equals, getEnvironment, getKey, getKeyProperty, getKeySymbol, hashCode, matches, matches
Methods inherited from class gnu.mapping.IndirectableLocation
getBase, getBaseForce, isConstant, setAlias, setBase
Methods inherited from class gnu.mapping.Location
define, getValue, make, make, make, print, setValue, toString
-
Constructor Details
-
DynamicLocation
-
-
Method Details
-
getLocation
Get the thread-specific Location for this Location. -
get
Description copied from class:Location
Get the current value of this location. -
get
-
isBound
public boolean isBound() -
set
-
setWithSave
Description copied from class:Location
Set a value, but return cookie so old value can be restored. This is intended for fluid-let where (in the case of multiple threads) a simple save-restore isn't always the right thing.- Overrides:
setWithSave
in classNamedLocation<T>
-
setRestore
Description copied from class:Location
Restore an old value.- Overrides:
setRestore
in classNamedLocation<T>
- Parameters:
oldValue
- the return value from a prior setWithSave.
-
undefine
public void undefine()- Overrides:
undefine
in classIndirectableLocation<T>
-
getName
-
getSymbol
-
setName
-
getInstance
For a given (Symbol. property)-pair, find or create a matching DynamicLocation.
-