Class RecursiveBindings

  • All Implemented Interfaces:
    java.util.Map<java.lang.String,​java.lang.Object>, javax.script.Bindings

    public final class RecursiveBindings
    extends javax.script.SimpleBindings
    Recursive bindings will search current bindings, then parent bindings, etc, etc, for the item.
    Author:
    Group 3
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      RecursiveBindings()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean containsKey​(java.lang.Object key)  
      java.lang.Object get​(java.lang.Object key)  
      java.util.Optional<RecursiveBindings> getParent()
      Get the optional parent bindings.
      boolean localContainsKey​(java.lang.Object key)
      Do the local bindings contain the key?
      java.util.Optional<java.lang.Object> localGet​(java.lang.Object key)
      Get key in local bindings.
      void setParent​(RecursiveBindings p)
      Set parent bindings.
      • Methods inherited from class javax.script.SimpleBindings

        clear, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • RecursiveBindings

        public RecursiveBindings()
        Constructor.
    • Method Detail

      • setParent

        public void setParent​(RecursiveBindings p)
        Set parent bindings.
        Parameters:
        p - Parent bindings.
      • getParent

        public java.util.Optional<RecursiveBindings> getParent()
        Get the optional parent bindings.
        Returns:
        Optional parent.
      • localContainsKey

        public boolean localContainsKey​(java.lang.Object key)
        Do the local bindings contain the key?
        Parameters:
        key - Key to find.
        Returns:
        True if key is contained.
      • localGet

        public java.util.Optional<java.lang.Object> localGet​(java.lang.Object key)
        Get key in local bindings.
        Parameters:
        key - key to retrieve.
        Returns:
        Optional object.
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface javax.script.Bindings
        Specified by:
        containsKey in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        containsKey in class javax.script.SimpleBindings
      • get

        public java.lang.Object get​(java.lang.Object key)
        Specified by:
        get in interface javax.script.Bindings
        Specified by:
        get in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        get in class javax.script.SimpleBindings