1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.jexl.context;
18
19 import org.apache.commons.jexl.JexlContext;
20
21 import java.util.HashMap;
22 import java.util.Map;
23
24 /***
25 * Implementation of JexlContext based on a HashMap.
26 *
27 * @since 1.0
28 * @author <a href="mailto:geirm@apache.org">Geir Magnusson Jr.</a>
29 * @version $Id: HashMapContext.java 397116 2006-04-26 07:01:33Z dion $
30 */
31 public class HashMapContext extends HashMap implements JexlContext {
32 /*** serialization version id jdk13 generated. */
33 static final long serialVersionUID = 5715964743204418854L;
34 /***
35 * {@inheritDoc}
36 */
37 public void setVars(Map vars) {
38 clear();
39 putAll(vars);
40 }
41
42 /***
43 * {@inheritDoc}
44 */
45 public Map getVars() {
46 return this;
47 }
48 }