public abstract class NamedLocation<T> extends IndirectableLocation<T> implements java.util.Map.Entry<EnvironmentKey,T>, EnvironmentKey
base, DIRECT_ON_SET, INDIRECT_FLUIDS, value
FUNCTION
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, undefine
define, get, get, getValue, isBound, make, make, make, print, set, setValue, toString
public NamedLocation(NamedLocation loc)
public NamedLocation(Symbol name, java.lang.Object property)
public boolean entered()
Location
public Environment getEnvironment()
getEnvironment
in class IndirectableLocation<T>
public final Symbol getKeySymbol()
getKeySymbol
in interface EnvironmentKey
getKeySymbol
in class IndirectableLocation<T>
public final java.lang.Object getKeyProperty()
getKeyProperty
in interface EnvironmentKey
getKeyProperty
in class IndirectableLocation<T>
public final boolean matches(EnvironmentKey key)
matches
in interface EnvironmentKey
public final boolean matches(Symbol symbol, java.lang.Object property)
matches
in interface EnvironmentKey
public 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.Object
public int hashCode()
hashCode
in interface java.util.Map.Entry<EnvironmentKey,T>
hashCode
in class java.lang.Object
public java.lang.Object setWithSave(T newValue)
Location
setWithSave
in class Location<T>
public void setRestore(java.lang.Object oldValue)
Location
setRestore
in class Location<T>
oldValue
- the return value from a prior setWithSave.