Class EvalEnvs.ArraySubEvalEnv

java.lang.Object
net.hydromatic.morel.eval.EvalEnvs.ArraySubEvalEnv
All Implemented Interfaces:
EvalEnv
Direct Known Subclasses:
EvalEnvs.MutableArraySubEvalEnv, EvalEnvs.PatSubEvalEnv
Enclosing class:
EvalEnvs

static class EvalEnvs.ArraySubEvalEnv extends Object implements EvalEnv
Similar to MutableEvalEnv but binds several names.
  • Field Details

    • parentEnv

      protected final EvalEnv parentEnv
    • names

      protected final com.google.common.collect.ImmutableList<String> names
    • values

      protected Object[] values
  • Constructor Details

  • Method Details

    • visit

      public void visit(BiConsumer<String,Object> consumer)
      Description copied from interface: EvalEnv
      Visits every variable binding in this environment.

      Bindings that are obscured by more recent bindings of the same name are visited, but after the more obscuring bindings.

      Specified by:
      visit in interface EvalEnv
    • getOpt

      public Object getOpt(String name)
      Description copied from interface: EvalEnv
      Returns the binding of name if bound, null if not.
      Specified by:
      getOpt in interface EvalEnv