public abstract class NamedLocation<T> extends IndirectableLocation<T> implements java.util.Map.Entry<EnvironmentKey,T>, EnvironmentKey
base, DIRECT_ON_SET, INDIRECT_FLUIDS, valueFUNCTION| Constructor and Description |
|---|
NamedLocation(NamedLocation loc) |
NamedLocation(Symbol name,
java.lang.Object property) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
entered()
True if directly entered in an Environment.
|
boolean |
equals(java.lang.Object x) |
Environment |
getEnvironment() |
EnvironmentKey |
getKey() |
java.lang.Object |
getKeyProperty() |
Symbol |
getKeySymbol() |
int |
hashCode() |
boolean |
matches(EnvironmentKey key) |
boolean |
matches(Symbol symbol,
java.lang.Object property) |
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.
|
getBase, getBaseForce, isConstant, setAlias, setBase, undefinedefine, get, get, getValue, isBound, make, make, make, print, set, setValue, toStringpublic NamedLocation(NamedLocation loc)
public NamedLocation(Symbol name, java.lang.Object property)
public boolean entered()
Locationpublic Environment getEnvironment()
getEnvironment in class IndirectableLocation<T>public final Symbol getKeySymbol()
getKeySymbol in interface EnvironmentKeygetKeySymbol in class IndirectableLocation<T>public final java.lang.Object getKeyProperty()
getKeyProperty in interface EnvironmentKeygetKeyProperty in class IndirectableLocation<T>public final boolean matches(EnvironmentKey key)
matches in interface EnvironmentKeypublic final boolean matches(Symbol symbol, java.lang.Object property)
matches in interface EnvironmentKeypublic final EnvironmentKey getKey()
getKey in interface java.util.Map.Entry<EnvironmentKey,T>public boolean equals(java.lang.Object x)
equals in interface java.util.Map.Entry<EnvironmentKey,T>equals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Map.Entry<EnvironmentKey,T>hashCode in class java.lang.Objectpublic java.lang.Object setWithSave(T newValue)
LocationsetWithSave in class Location<T>public void setRestore(java.lang.Object oldValue)
LocationsetRestore in class Location<T>oldValue - the return value from a prior setWithSave.