|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norecess.citkit.environment.NullEnvironment<T>
public class NullEnvironment<T>
Constructor Summary | |
---|---|
NullEnvironment()
|
Method Summary | |
---|---|
void |
add(ISymbol variable,
T value)
Adds a new variable to the current environment. |
Environment<T> |
create()
Creates a nested environment. |
void |
define(ISymbol variable,
T value)
Defines the variable in the top level environment. |
boolean |
equals(java.lang.Object o)
|
T |
get(ISymbol variable)
Returns the value associated with the specified variable. |
int |
hashCode()
|
T |
set(ISymbol variable,
T value)
Changes the value associated with the specified variable. |
HobbesTIR |
setInCurrentScope(ISymbol variable,
T value)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NullEnvironment()
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void add(ISymbol variable, T value) throws InvalidVariableException
IEnvironment
add
in interface IEnvironment<T>
variable
- the new variable to add to the environment.value
- the new value to associate with the new variable.
InvalidVariableException
- when the variable is already declared in the current
scope.public void define(ISymbol variable, T value)
IEnvironment
define
in interface IEnvironment<T>
variable
- the variable to define.value
- the value to set it to.public T get(ISymbol variable) throws InvalidVariableException
IEnvironment
get
in interface IEnvironment<T>
variable
- the variable to search for.
InvalidVariableException
- when the variable is undeclared (in this or any previous
scope).public T set(ISymbol variable, T value) throws InvalidVariableException
IEnvironment
set
in interface IEnvironment<T>
variable
- the variable to search for.value
- the new value for the variable.
InvalidVariableException
- when the variable is undeclared (in this or any previous
scope).public HobbesTIR setInCurrentScope(ISymbol variable, T value) throws InvalidVariableException
InvalidVariableException
public Environment<T> create()
IEnvironment
create
in interface IEnvironment<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |