Class SimpleEnv<K extends Symbol,​V>

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

    public class SimpleEnv<K extends Symbol,​V>
    extends java.lang.Object
    implements Env<K,​V>
    A simple ImmutableMap-backed Env.
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleEnv​(com.google.common.collect.ImmutableMap<K,​V> map)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.common.collect.ImmutableMap<K,​V> asMap()  
      static <K extends Symbol,​V>
      SimpleEnv.Builder<K,​V>
      builder()  
      @Nullable V get​(K sym)
      Returns the information associated with the given symbol in this environment.
      • 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
    • Constructor Detail

      • SimpleEnv

        public SimpleEnv​(com.google.common.collect.ImmutableMap<K,​V> map)
    • Method Detail

      • asMap

        public com.google.common.collect.ImmutableMap<K,​V> asMap()
      • get

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