Class VariableMapImpl

    • 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>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​TypedValue> variables  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> asValueMap()  
      VariableContext asVariableContext()
      Interprets the variable map as variable context
      void clear()  
      boolean containsKey​(java.lang.Object key)  
      boolean containsValue​(java.lang.Object value)  
      boolean containsVariable​(java.lang.String variableName)
      Checks whether a variable with the given name is resolve through this context.
      java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entrySet()  
      boolean equals​(java.lang.Object obj)  
      java.lang.Object get​(java.lang.Object key)  
      <T> T getValue​(java.lang.String name, java.lang.Class<T> type)  
      <T extends TypedValue>
      T
      getValueTyped​(java.lang.String name)  
      int hashCode()  
      boolean isEmpty()  
      java.util.Set<java.lang.String> keySet()  
      java.lang.Object put​(java.lang.String key, java.lang.Object value)  
      void putAll​(java.util.Map<? extends java.lang.String,​? extends java.lang.Object> m)  
      VariableMap putValue​(java.lang.String name, java.lang.Object value)  
      VariableMap putValueTyped​(java.lang.String name, TypedValue value)  
      java.lang.Object remove​(java.lang.Object key)  
      TypedValue resolve​(java.lang.String variableName)
      Resolve a value in this context.
      int size()  
      java.lang.String toString()  
      java.util.Collection<java.lang.Object> values()  
      • Methods inherited from class java.lang.Object

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

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Field Detail

      • variables

        protected java.util.Map<java.lang.String,​TypedValue> variables
    • Constructor Detail

      • VariableMapImpl

        public VariableMapImpl​(java.util.Map<java.lang.String,​java.lang.Object> map)
      • VariableMapImpl

        public VariableMapImpl()
    • Method Detail

      • getValue

        public <T> T getValue​(java.lang.String name,
                              java.lang.Class<T> type)
        Specified by:
        getValue in interface VariableMap
      • size

        public int size()
        Specified by:
        size in interface java.util.Map<java.lang.String,​java.lang.Object>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Map<java.lang.String,​java.lang.Object>
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Specified by:
        containsKey in interface java.util.Map<java.lang.String,​java.lang.Object>
      • containsValue

        public boolean containsValue​(java.lang.Object value)
        Specified by:
        containsValue in interface java.util.Map<java.lang.String,​java.lang.Object>
      • get

        public java.lang.Object get​(java.lang.Object key)
        Specified by:
        get in interface java.util.Map<java.lang.String,​java.lang.Object>
      • put

        public java.lang.Object put​(java.lang.String key,
                                    java.lang.Object value)
        Specified by:
        put in interface java.util.Map<java.lang.String,​java.lang.Object>
      • remove

        public java.lang.Object remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<java.lang.String,​java.lang.Object>
      • putAll

        public void putAll​(java.util.Map<? extends java.lang.String,​? extends java.lang.Object> m)
        Specified by:
        putAll in interface java.util.Map<java.lang.String,​java.lang.Object>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<java.lang.String,​java.lang.Object>
      • keySet

        public java.util.Set<java.lang.String> keySet()
        Specified by:
        keySet in interface java.util.Map<java.lang.String,​java.lang.Object>
        Specified by:
        keySet in interface VariableContext
        Returns:
        a set of all variable names resolvable through this Context.
      • values

        public java.util.Collection<java.lang.Object> values()
        Specified by:
        values in interface java.util.Map<java.lang.String,​java.lang.Object>
      • entrySet

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<java.lang.String,​java.lang.Object>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface java.util.Map<java.lang.String,​java.lang.Object>
        Overrides:
        hashCode in class java.lang.Object
      • asValueMap

        public java.util.Map<java.lang.String,​java.lang.Object> asValueMap()
      • resolve

        public TypedValue resolve​(java.lang.String variableName)
        Description copied from interface: VariableContext
        Resolve a value in this context.
        Specified by:
        resolve in interface VariableContext
        Parameters:
        variableName - the name of the variable to resolve.
        Returns:
        the value of the variable or null in case the variable does not exist.
      • containsVariable

        public boolean containsVariable​(java.lang.String variableName)
        Description copied from interface: VariableContext
        Checks whether a variable with the given name is resolve through this context.
        Specified by:
        containsVariable in interface VariableContext
        Parameters:
        variableName - the name of the variable to check
        Returns:
        true if the variable is resolve.
      • asVariableContext

        public VariableContext asVariableContext()
        Description copied from interface: VariableMap
        Interprets the variable map as variable context
        Specified by:
        asVariableContext in interface VariableMap
        Returns:
        A VariableContext which is capable of resolving all variables in the map