|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface Interpreter.Env
The context in which an expression is evaluated.
Method Summary | |
---|---|
java.lang.Object |
assign(Interpreter.VarRef ref,
java.lang.Object val)
Changes the value bound to the variable and then returns the new value. |
Interpreter.Env |
bind(Symbol[] vars,
java.lang.Object[] vals)
Returns a new Env in which the variables are bound to the corresponding values. |
java.lang.Object |
defaultValue()
Returns the value that should be returned by expressions that do not have anything more appropriate to return. |
boolean |
isTrue(java.lang.Object value)
Determines whether the object should be regarded as true; otherwise, the object is considered false. |
java.lang.Object |
lookup(Interpreter.VarRef ref)
Returns the value bound to the variable by this environment. |
Method Detail |
---|
java.lang.Object lookup(Interpreter.VarRef ref)
java.lang.Error
- if the variable is not bound.Interpreter.Env bind(Symbol[] vars, java.lang.Object[] vals)
java.lang.Error
- if there aren't exactly as many variables as values.java.lang.Object assign(Interpreter.VarRef ref, java.lang.Object val)
java.lang.Object defaultValue()
boolean isTrue(java.lang.Object value)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |