containsKey
public final boolean containsKey(Object key)
defaultNamespace
public Namespace defaultNamespace()
define
public abstract void define(Symbol key,
Object property,
Object newValue)
enumerateAllLocations
public abstract LocationEnumeration enumerateAllLocations()
Does enumerate inherited Locations.
enumerateLocations
public abstract LocationEnumeration enumerateLocations()
Does not enumerate inherited Locations.
get
public final Object get(Object key)
Get the value bound to the given name.
Returns null if the name has no binding
(for compatibility with Java2 Collections framework).
get
public final Object get(String key,
Object defaultValue)
get
public Object get(Symbol sym)
get
public Object get(Symbol key,
Object property,
Object defaultValue)
getCanDefine
public boolean getCanDefine()
True if new bindings (non-unbound Locations) can be added.
getCanRedefine
public boolean getCanRedefine()
True if bindings can be removed or replaced by other kinds of Location.
getChecked
public final Object getChecked(String name)
Get the value bound to the given name.
getFlags
public int getFlags()
getFunction
public final Object getFunction(Symbol sym)
getFunction
public final Object getFunction(Symbol key,
Object defaultValue)
getInstance
public static Environment getInstance(String name)
getLocation
public final Location getLocation(Object key,
boolean create)
getLocation
public final Location getLocation(Symbol key)
Return a location bound to key (and null property).
Create new unbound Location if no such Location exists.
getLocation
public final Location getLocation(Symbol key,
Object property)
Return a location bound to (key, property).
Create new unbound Location if no such Location exists.
getLocation
public final NamedLocation getLocation(Symbol name,
Object property,
boolean create)
getLocation
public abstract NamedLocation getLocation(Symbol key,
Object property,
int hash,
boolean create)
getSymbol
public Symbol getSymbol(String name)
isBound
public final boolean isBound(Symbol key)
isBound
public boolean isBound(Symbol key,
Object property)
isLocked
public final boolean isLocked()
True if this environment is locked - bindings cannot be added or removed.
lookup
public final Location lookup(Symbol key,
Object property)
Return a location bound to (key, property).
Return null if no such Location exists.
put
public final Object put(Object key,
Object newValue)
put
public final Object put(String key,
Object value)
put
public final void put(Symbol key,
Object newValue)
put
public void put(Symbol key,
Object property,
Object newValue)
putFunction
public final void putFunction(Symbol key,
Object newValue)
remove
public final Object remove(Object key)
remove
public final Object remove(EnvironmentKey key)
Remove and undefine binding.
remove
public final void remove(Symbol sym)
remove
public final Object remove(Symbol symbol,
Object property)
remove
public Object remove(Symbol key,
Object property,
int hash)
Remove Location from this Environment and undefine it.
removeFunction
public final void removeFunction(Symbol sym)
setCanDefine
public void setCanDefine(boolean canDefine)
setCanRedefine
public void setCanRedefine(boolean canRedefine)
setCurrent
public static void setCurrent(Environment env)
setFlag
public void setFlag(boolean setting,
int flag)
setIndirectDefines
public final void setIndirectDefines()
setLocked
public void setLocked()
toString
public String toString()
toStringVerbose
public String toStringVerbose()
Overridden in sub-classes - useful for more verbose debug output.
unlink
public Location unlink(Symbol key,
Object property,
int hash)
Remove Location from this Environment.
Does not explicitly undefine the location itself.