01: package biz.hammurapi.config;
02:
03: import java.util.HashMap;
04: import java.util.Iterator;
05: import java.util.Map;
06:
07: /**
08: * Simple map-backed context.
09: * @author Pavel
10: *
11: */
12: public class SimpleContext implements MutableContext,
13: TraversableContext {
14: private Map values = new HashMap();
15:
16: public Object get(String name) {
17: return values.get(name);
18: }
19:
20: public void set(String name, Object value) {
21: values.put(name, value);
22: }
23:
24: public void remove(String name) {
25: values.remove(name);
26: }
27:
28: public Iterator getNames() {
29: return values.keySet().iterator();
30: }
31:
32: }
|