01: /*
02: * Created on 16 Jul 2007
03: */
04: package uk.org.ponder.rsf.swf.util;
05:
06: import java.util.Collection;
07: import java.util.Map;
08: import java.util.Set;
09:
10: import org.springframework.binding.collection.SharedMap;
11:
12: /** A concrete implementation of the Spring Web Flow abstraction. Probably
13: * not worth bringing out CGLib for this small work.
14: * @author Antranig Basman (antranig@caret.cam.ac.uk)
15: */
16: public class ConcreteSharedMap implements SharedMap {
17: private Map wrapped;
18: private Object mutex;
19:
20: public ConcreteSharedMap(Map wrapped, Object mutex) {
21: this .wrapped = wrapped;
22: this .mutex = mutex;
23: }
24:
25: public Object getMutex() {
26: return mutex;
27: }
28:
29: public void clear() {
30: wrapped.clear();
31: }
32:
33: public boolean containsKey(Object key) {
34: return wrapped.containsKey(key);
35: }
36:
37: public boolean containsValue(Object value) {
38: return wrapped.containsValue(value);
39: }
40:
41: public Set entrySet() {
42: return wrapped.entrySet();
43: }
44:
45: public boolean equals(Object o) {
46: return wrapped.equals(o);
47: }
48:
49: public Object get(Object key) {
50: return wrapped.get(key);
51: }
52:
53: public int hashCode() {
54: return wrapped.hashCode();
55: }
56:
57: public boolean isEmpty() {
58: return wrapped.isEmpty();
59: }
60:
61: public Set keySet() {
62: return wrapped.keySet();
63: }
64:
65: public Object put(Object arg0, Object arg1) {
66: return wrapped.put(arg0, arg1);
67: }
68:
69: public void putAll(Map arg0) {
70: wrapped.putAll(arg0);
71: }
72:
73: public Object remove(Object key) {
74: return wrapped.remove(key);
75: }
76:
77: public int size() {
78: return wrapped.size();
79: }
80:
81: public Collection values() {
82: return wrapped.values();
83: }
84: }
|