Class NamedLocation<T>
java.lang.Object
gnu.mapping.Location<T>
gnu.mapping.IndirectableLocation<T>
gnu.mapping.NamedLocation<T>
- All Implemented Interfaces:
EnvironmentKey, Map.Entry<EnvironmentKey, T>
- Direct Known Subclasses:
AbstractScriptEngineFactory.BindingsLocation, DynamicLocation, PlainLocation, SharedLocation, ThreadLocation
public abstract class NamedLocation<T>
extends IndirectableLocation<T>
implements Map.Entry<EnvironmentKey, T>, EnvironmentKey
A Location that can be used as an entry in an Environment.
-
Field Summary
Fields inherited from class IndirectableLocation
base, DIRECT_ON_SET, INDIRECT_FLUIDS, valueFields inherited from interface EnvironmentKey
FUNCTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanentered()True if directly entered in an Environment.booleanfinal EnvironmentKeygetKey()final Objectfinal SymbolinthashCode()final booleanmatches(EnvironmentKey key) final booleanvoidsetRestore(Object oldValue) Restore an old value.setWithSave(T newValue) Set a value, but return cookie so old value can be restored.Methods inherited from class IndirectableLocation
getBase, getBaseForce, isConstant, setAlias, setBase, undefine
-
Constructor Details
-
NamedLocation
-
NamedLocation
-
-
Method Details
-
entered
-
getEnvironment
- Overrides:
getEnvironmentin classIndirectableLocation<T>
-
getKeySymbol
- Specified by:
getKeySymbolin interfaceEnvironmentKey- Overrides:
getKeySymbolin classIndirectableLocation<T>
-
getKeyProperty
- Specified by:
getKeyPropertyin interfaceEnvironmentKey- Overrides:
getKeyPropertyin classIndirectableLocation<T>
-
matches
- Specified by:
matchesin interfaceEnvironmentKey
-
matches
- Specified by:
matchesin interfaceEnvironmentKey
-
getKey
- Specified by:
getKeyin interfaceMap.Entry<EnvironmentKey, T>
-
equals
-
hashCode
-
setWithSave
Description copied from class:LocationSet 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:
setWithSavein classLocation<T>
-
setRestore
Description copied from class:LocationRestore an old value.- Overrides:
setRestorein classLocation<T>- Parameters:
oldValue- the return value from a prior setWithSave.
-