Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.util.lisp
Interface Interpreter.Env

All Known Implementing Classes:
  Interpreter.AbstractEnv, Interpreter.GlobalEnv, Interpreter.LexicalEnv

Enclosing class:
  Interpreter

    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

### lookup

    java.lang.Object lookup(Interpreter.VarRef ref)

  Returns the value bound to the variable by this environment.

  Throws:
    `java.lang.Error` - if the variable is not bound.

### bind

    Interpreter.Env bind(Symbol[] vars,
                         java.lang.Object[] vals)

  Returns a new Env in which the variables are bound to the corresponding values.

  Throws:
    `java.lang.Error` - if there aren't exactly as many variables as values.

### assign

    java.lang.Object assign(Interpreter.VarRef ref,
                            java.lang.Object val)

  Changes the value bound to the variable and then returns the new value. Note that this typically modifies an existing binding relationship rather than create a new one; however, a new one may be created, for instance if the variable is not already bound.

### defaultValue

    java.lang.Object defaultValue()

  Returns the value that should be returned by expressions that do not have anything more appropriate to return.

### isTrue

    boolean isTrue(java.lang.Object value)

  Determines whether the object should be regarded as true; otherwise, the object is considered false.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD