Package org.apache.commons.jexl.context
Class HashMapContext
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,Object> JexlContext
Implementation of JexlContext based on a HashMap.
- Since:
- 1.0
- Version:
- $Id$
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
HashMapContext
public HashMapContext()
-
-
Method Details
-
setVars
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 interfaceJexlContext
- Parameters:
vars
- Contents of vars will be replaced with the content of this Map
-
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 interfaceJexlContext
- Returns:
- A reference to the variable Map associated with this JexlContext.
-