gnu.mapping
Class NamedLocation
java.lang.Object
gnu.mapping.Location
gnu.mapping.IndirectableLocation
gnu.mapping.NamedLocation
- All Implemented Interfaces:
- EnvironmentKey, java.util.Map.Entry
- Direct Known Subclasses:
- PlainLocation, SharedLocation
public abstract class NamedLocation
- extends IndirectableLocation
- implements java.util.Map.Entry, EnvironmentKey
A Location that can be used as an entry in an Environment.
Methods inherited from class gnu.mapping.Location |
get, get, getValue, isBound, make, make, make, print, set, setValue, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map.Entry |
getValue, setValue |
NamedLocation
public NamedLocation(NamedLocation loc)
NamedLocation
public NamedLocation(Symbol name,
java.lang.Object property)
entered
public boolean entered()
- Description copied from class:
Location
- True if directly entered in an Environment. (Only if NamedLocation.)
- Overrides:
entered
in class Location
getEnvironment
public Environment getEnvironment()
- Overrides:
getEnvironment
in class IndirectableLocation
getKeySymbol
public final Symbol getKeySymbol()
- Specified by:
getKeySymbol
in interface EnvironmentKey
- Overrides:
getKeySymbol
in class IndirectableLocation
getKeyProperty
public final java.lang.Object getKeyProperty()
- Specified by:
getKeyProperty
in interface EnvironmentKey
- Overrides:
getKeyProperty
in class IndirectableLocation
matches
public final boolean matches(EnvironmentKey key)
- Specified by:
matches
in interface EnvironmentKey
matches
public final boolean matches(Symbol symbol,
java.lang.Object property)
- Specified by:
matches
in interface EnvironmentKey
getKey
public final java.lang.Object getKey()
- Specified by:
getKey
in interface java.util.Map.Entry
equals
public boolean equals(java.lang.Object x)
- Specified by:
equals
in interface java.util.Map.Entry
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface java.util.Map.Entry
- Overrides:
hashCode
in class java.lang.Object
setWithSave
public java.lang.Object setWithSave(java.lang.Object newValue,
CallContext ctx)
- 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 class Location
setRestore
public void setRestore(java.lang.Object oldValue,
CallContext ctx)
- Description copied from class:
Location
- Restore an old value.
- Overrides:
setRestore
in class Location
- Parameters:
oldValue
- the return value from a prior setWithSave.