Class HashMapContext

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,​java.lang.Object>, JexlContext

    public class HashMapContext
    extends java.util.HashMap<java.lang.String,​java.lang.Object>
    implements JexlContext
    Implementation of JexlContext based on a HashMap.
    Since:
    1.0
    Version:
    $Id$
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • 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
      HashMapContext()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> getVars()
      Retrives the Map of variables associated with this JexlContext.
      void setVars​(java.util.Map<java.lang.String,​java.lang.Object> vars)
      Replaces variables in a JexlContext with the variables contained in the supplied Map.
      • Methods inherited from class java.util.HashMap

        clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

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

        equals, hashCode
    • Method Detail

      • setVars

        public void setVars​(java.util.Map<java.lang.String,​java.lang.Object> vars)
        Replaces variables in a JexlContext with the variables contained in the supplied Map. When setVars() is called on a JexlContext, it clears the current Map and puts each entry of the supplied Map into the current variable Map.
        Specified by:
        setVars in interface JexlContext
        Parameters:
        vars - Contents of vars will be replaced with the content of this Map
      • getVars

        public java.util.Map<java.lang.String,​java.lang.Object> getVars()
        Retrives the Map of variables associated with this JexlContext. The keys of this map correspond to variable names referenced in a JEXL expression.
        Specified by:
        getVars in interface JexlContext
        Returns:
        A reference to the variable Map associated with this JexlContext.