Class CompoundEnv<S extends Symbol,​V>

  • All Implemented Interfaces:
    Env<S,​V>

    public class CompoundEnv<S extends Symbol,​V>
    extends java.lang.Object
    implements Env<S,​V>
    An Env that chains two existing envs together.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CompoundEnv<S,​V> append​(Env<S,​? extends V> env)
      Adds an env to the chain.
      @Nullable V get​(S sym)
      Returns the information associated with the given symbol in this environment.
      static <S extends Symbol,​V>
      CompoundEnv<S,​V>
      of​(Env<S,​? extends V> env)
      A chainable compound env with a single entry.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.turbine.binder.env.Env

        getNonNull
    • Method Detail

      • get

        public @Nullable V get​(S sym)
        Description copied from interface: Env
        Returns the information associated with the given symbol in this environment.
        Specified by:
        get in interface Env<S extends Symbol,​V>
      • of

        public static <S extends Symbol,​V> CompoundEnv<S,​V> of​(Env<S,​? extends V> env)
        A chainable compound env with a single entry.
      • append

        public CompoundEnv<S,​V> append​(Env<S,​? extends V> env)
        Adds an env to the chain.