Class Display<K,​V>

  • Type Parameters:
    K - The type of the Key
    V - The type of the Value

    public class Display<K,​V>
    extends java.lang.Object
    Supports a Display as typically found in Lexical scoping. Upon entering a scope, a new environment is available for binding keys to values. Exiting a scope remove the top-most environment. Lookup searches from the top down to find the value for the first matching key.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.util.Map<K,​V>> display  
    • Constructor Summary

      Constructors 
      Constructor Description
      Display()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void bind​(java.util.Map<K,​V> bindings)  
      void bind​(K key, V value)  
      void enterScope()  
      void exitScope()  
      V lookup​(K key)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • display

        private java.util.List<java.util.Map<K,​V>> display
    • Constructor Detail

      • Display

        public Display()
    • Method Detail

      • enterScope

        public void enterScope()
      • exitScope

        public void exitScope()
      • bind

        public void bind​(K key,
                         V value)
      • bind

        public void bind​(java.util.Map<K,​V> bindings)
      • lookup

        public V lookup​(K key)