|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.apache.commons.collections.ProxyMap
This Map wraps another Map
implementation, using the wrapped instance for its default
implementation. This class is used as a framework on which to
build to extensions for its wrapped Map object which
would be unavailable or inconvenient via sub-classing (but usable
via composition).
An example use case is where the wrapped Map needs
synchronization (to make it thread-safe), but the Map
returned by Collections.synchronizedMap(map)
hides part of map's public interface.
| Constructor Summary | |
ProxyMap(java.util.Map map)
Creates a new instance acting as a representative for the specified Map. |
|
| Method Summary | |
void |
clear()
Invokes the underlying Map.clear() method. |
boolean |
containsKey(java.lang.Object key)
Invokes the underlying Map.containsKey(Object) method. |
boolean |
containsValue(java.lang.Object value)
Invokes the underlying Map.containsValue(Object) method. |
java.util.Set |
entrySet()
Invokes the underlying Map.entrySet() method. |
boolean |
equals(java.lang.Object m)
Invokes the underlying Map.equals(Object) method. |
java.lang.Object |
get(java.lang.Object key)
Invokes the underlying Map.get(Object) method. |
int |
hashCode()
Invokes the underlying Map.hashCode() method. |
boolean |
isEmpty()
Invokes the underlying Map.isEmpty() method. |
java.util.Set |
keySet()
Invokes the underlying Map.keySet() method. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Invokes the underlying Map.put(Object,Object) method. |
void |
putAll(java.util.Map t)
Invokes the underlying Map.putAll(Map) method. |
java.lang.Object |
remove(java.lang.Object key)
Invokes the underlying Map.remove(Object) method. |
int |
size()
Invokes the underlying Map.size() method. |
java.util.Collection |
values()
Invokes the underlying Map.values() method. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ProxyMap(java.util.Map map)
Map.
map - The Map to whose operations to wrap.| Method Detail |
public void clear()
Map.clear() method.
clear in interface java.util.Mappublic boolean containsKey(java.lang.Object key)
Map.containsKey(Object) method.
containsKey in interface java.util.Mappublic boolean containsValue(java.lang.Object value)
Map.containsValue(Object) method.
containsValue in interface java.util.Mappublic java.util.Set entrySet()
Map.entrySet() method.
entrySet in interface java.util.Mappublic boolean equals(java.lang.Object m)
Map.equals(Object) method.
equals in interface java.util.Mapequals in class java.lang.Objectpublic java.lang.Object get(java.lang.Object key)
Map.get(Object) method.
get in interface java.util.Mappublic int hashCode()
Map.hashCode() method.
hashCode in interface java.util.MaphashCode in class java.lang.Objectpublic boolean isEmpty()
Map.isEmpty() method.
isEmpty in interface java.util.Mappublic java.util.Set keySet()
Map.keySet() method.
keySet in interface java.util.Map
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
Map.put(Object,Object) method.
put in interface java.util.Mappublic void putAll(java.util.Map t)
Map.putAll(Map) method.
putAll in interface java.util.Mappublic java.lang.Object remove(java.lang.Object key)
Map.remove(Object) method.
remove in interface java.util.Mappublic int size()
Map.size() method.
size in interface java.util.Mappublic java.util.Collection values()
Map.values() method.
values in interface java.util.Map
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||