1 16 package org.springframework.binding.collection; 17 18 import java.io.Serializable ; 19 import java.util.Collection ; 20 import java.util.Map ; 21 import java.util.Set ; 22 23 import org.springframework.core.style.ToStringCreator; 24 25 32 public class SharedMapDecorator implements SharedMap, Serializable { 33 34 37 private Map map; 38 39 43 public SharedMapDecorator(Map map) { 44 this.map = map; 45 } 46 47 49 public void clear() { 50 map.clear(); 51 } 52 53 public boolean containsKey(Object key) { 54 return map.containsKey(key); 55 } 56 57 public boolean containsValue(Object value) { 58 return map.containsValue(value); 59 } 60 61 public Set entrySet() { 62 return map.entrySet(); 63 } 64 65 public Object get(Object key) { 66 return map.get(key); 67 } 68 69 public boolean isEmpty() { 70 return map.isEmpty(); 71 } 72 73 public Set keySet() { 74 return map.keySet(); 75 } 76 77 public Object put(Object key, Object value) { 78 return map.put(key, value); 79 } 80 81 public void putAll(Map map) { 82 this.map.putAll(map); 83 } 84 85 public Object remove(Object key) { 86 return map.remove(key); 87 } 88 89 public int size() { 90 return map.size(); 91 } 92 93 public Collection values() { 94 return map.values(); 95 } 96 97 99 public Object getMutex() { 100 return map; 101 } 102 103 public String toString() { 104 return new ToStringCreator(this).append("map", map).append("mutex", getMutex()).toString(); 105 } 106 } | Popular Tags |