Class HashMapContext

java.lang.Object
java.util.AbstractMap<String,Object>
java.util.HashMap<String,Object>
org.apache.commons.jexl.context.HashMapContext
All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, JexlContext

public class HashMapContext extends HashMap<String,Object> implements JexlContext
Implementation of JexlContext based on a HashMap.
Since:
1.0
Version:
$Id$
See Also:
  • Constructor Details

  • Method Details

    • setVars

      public void setVars(Map<String,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 Map<String,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.