| java.lang.Object gnu.mapping.Procedure gnu.mapping.Procedure1 gnu.mapping.NameMap gnu.mapping.Environment
Environment | public class Environment extends NameMap (Code) | | An environment contains (name->value) bindings.
Names are Strings that are compared by ==, not equal.
author: Per Bothner |
Method Summary | |
public void | addBinding(Binding binding) | public Binding | addBinding(String name, Object value) | public static Environment | current() | public Binding | define(String name, Object value) | public static void | defineFunction(String name, Object new_value) | public static void | defineFunction(Environment env, String name, Object new_value) | public Binding | defineValue(String name, Object value) Define the value binding for a symbol. | public static void | define_global(String name, Object new_value) Define name (interned) to have a given value. | public BindingEnumeration | enumerateAllBindings() Does enumerate inherited Bindings. | public BindingEnumeration | enumerateBindings() Does not enumerate inherited Bindings. | public Object | get(String name, Object defaultValue) | public Binding | getBinding(String name) | public static Environment | getCurrent() | public static Binding | getCurrentBinding(String name) | public Object | getFunction(String name) Get the function binding for a symbol. | final public boolean | isBound(String name) | final public boolean | isLocked() True if this environment is locked - bindings cannot be added or removed. | public Binding | lookup(String name) Search for a variable binding by name. | public static Object | lookup_global(String name) | public Object | put(String name, Object value) | public Object | put(Object name, Object value) | public void | putFunction(String name, Object value) Set the function binding for a symbol. | public static void | put_global(String name, Object new_value) Define name (interned) to have a given value. | void | rehash() | public Object | remove(String name) | public Object | remove(Object name) | public void | remove(Binding binding) | public static void | setCurrent(Environment env) | final public void | setLocked(boolean locked) | public String | toString() | public static Environment | user() |
num_bindings | int num_bindings(Code) | | |
Environment | public Environment()(Code) | | |
Environment | public Environment(int capacity)(Code) | | |
define | public Binding define(String name, Object value)(Code) | | Define the value or function binding for a symbol, as appropriate
|
define_global | public static void define_global(String name, Object new_value)(Code) | | Define name (interned) to have a given value.
|
getFunction | public Object getFunction(String name)(Code) | | Get the function binding for a symbol.
If this Environment is a single-namespace language (such as Scheme).
this is equivalent to getChecked.
exception: gnu.mapping.UnboundSymbol - the name has no function binding |
isLocked | final public boolean isLocked()(Code) | | True if this environment is locked - bindings cannot be added or removed.
|
lookup | public Binding lookup(String name)(Code) | | Search for a variable binding by name.
Parameters: sym - the (interned) name of the binding to search for the value of the binding, or null if not found |
putFunction | public void putFunction(String name, Object value)(Code) | | Set the function binding for a symbol.
If this Environment is a single-namespace language (such as Scheme).
this is equivalent to put.
|
put_global | public static void put_global(String name, Object new_value)(Code) | | Define name (interned) to have a given value.
|
setLocked | final public void setLocked(boolean locked)(Code) | | |
Methods inherited from gnu.mapping.Procedure | public void apply(Runnable ctx) throws Throwable(Code)(Java Doc) abstract public Object apply0() throws Throwable(Code)(Java Doc) abstract public Object apply1(Object arg1) throws Throwable(Code)(Java Doc) abstract public Object apply2(Object arg1, Object arg2) throws Throwable(Code)(Java Doc) abstract public Object apply3(Object arg1, Object arg2, Object arg3) throws Throwable(Code)(Java Doc) abstract public Object apply4(Object arg1, Object arg2, Object arg3, Object arg4) throws Throwable(Code)(Java Doc) abstract public Object applyN(Object[] args) throws Throwable(Code)(Java Doc) public static void checkArgCount(Procedure proc, int argCount)(Code)(Java Doc) public String getName()(Code)(Java Doc) public Object getProperty(Object key, Object defaultValue)(Code)(Java Doc) public Procedure getSetter()(Code)(Java Doc) final public int maxArgs()(Code)(Java Doc) final public int minArgs()(Code)(Java Doc) final public String name()(Code)(Java Doc) public int numArgs()(Code)(Java Doc) public Object removeProperty(Object key)(Code)(Java Doc) public void set0(Object result) throws Throwable(Code)(Java Doc) public void set1(Object arg1, Object value) throws Throwable(Code)(Java Doc) public void setN(Object[] args) throws Throwable(Code)(Java Doc) final public void setName(String name)(Code)(Java Doc) public synchronized void setProperty(Object key, Object value)(Code)(Java Doc) public static Object[] setProperty(Object[] properties, Object key, Object value)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|