|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | 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.
Inner classes inherited from class java.util.Map |
Map.Entry |
Field Summary | |
protected Map |
map
The Map used for default implementations. |
Constructor Summary | |
ProxyMap(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(Object key)
Invokes the underlying Map.containsKey(Object) method. |
boolean |
containsValue(Object value)
Invokes the underlying Map.containsValue(Object) method. |
Set |
entrySet()
Invokes the underlying Map.entrySet() method. |
boolean |
equals(Object m)
Invokes the underlying Map.equals(Object) method. |
Object |
get(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. |
Set |
keySet()
Invokes the underlying Map.keySet() method. |
Object |
put(Object key,
Object value)
Invokes the underlying Map.put(Object,Object) method. |
void |
putAll(Map t)
Invokes the underlying Map.putAll(Map) method. |
Object |
remove(Object key)
Invokes the underlying Map.remove(Object) method. |
int |
size()
Invokes the underlying Map.size() method. |
Collection |
values()
Invokes the underlying Map.values() method. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected Map map
Map
used for default implementations.Constructor Detail |
public ProxyMap(Map map)
Map
.map
- The Map
to whose operations to wrap.Method Detail |
public void clear()
Map.clear()
method.public boolean containsKey(Object key)
Map.containsKey(Object)
method.public boolean containsValue(Object value)
Map.containsValue(Object)
method.public Set entrySet()
Map.entrySet()
method.public boolean equals(Object m)
Map.equals(Object)
method.public Object get(Object key)
Map.get(Object)
method.public int hashCode()
Map.hashCode()
method.public boolean isEmpty()
Map.isEmpty()
method.public Set keySet()
Map.keySet()
method.public Object put(Object key, Object value)
Map.put(Object,Object)
method.public void putAll(Map t)
Map.putAll(Map)
method.public Object remove(Object key)
Map.remove(Object)
method.public int size()
Map.size()
method.public Collection values()
Map.values()
method.
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |