|
|||||||||||
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).
This implementation does not perform any special processing with
entrySet()
, keySet()
or values()
. Instead
it simply returns the set/collection from the wrapped map. This may be
undesirable, for example if you are trying to write a validating
implementation it would provide a loophole around the validation. But,
you might want that loophole, so this class is kept simple.
Field Summary | |
protected Map |
map
Deprecated. The Map to delegate to. |
Constructor Summary | |
ProxyMap(Map map)
Deprecated. Constructor that uses the specified map to delegate to. |
Method Summary | |
void |
clear()
Deprecated. Invokes the underlying Map.clear() method. |
boolean |
containsKey(Object key)
Deprecated. Invokes the underlying Map.containsKey(Object) method. |
boolean |
containsValue(Object value)
Deprecated. Invokes the underlying Map.containsValue(Object) method. |
Set |
entrySet()
Deprecated. Invokes the underlying Map.entrySet() method. |
boolean |
equals(Object m)
Deprecated. Invokes the underlying Map.equals(Object) method. |
Object |
get(Object key)
Deprecated. Invokes the underlying Map.get(Object) method. |
int |
hashCode()
Deprecated. Invokes the underlying Map.hashCode() method. |
boolean |
isEmpty()
Deprecated. Invokes the underlying Map.isEmpty() method. |
Set |
keySet()
Deprecated. Invokes the underlying Map.keySet() method. |
Object |
put(Object key,
Object value)
Deprecated. Invokes the underlying Map.put(Object,Object) method. |
void |
putAll(Map t)
Deprecated. Invokes the underlying Map.putAll(Map) method. |
Object |
remove(Object key)
Deprecated. Invokes the underlying Map.remove(Object) method. |
int |
size()
Deprecated. Invokes the underlying Map.size() method. |
Collection |
values()
Deprecated. 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
to delegate to.
Constructor Detail |
public ProxyMap(Map map)
Note that the map is used for delegation, and is not copied. This is
different to the normal use of a Map
parameter in
collections constructors.
map
- the Map
to delegate toMethod Detail |
public void clear()
Map.clear()
method.
clear
in interface Map
public boolean containsKey(Object key)
Map.containsKey(Object)
method.
containsKey
in interface Map
public boolean containsValue(Object value)
Map.containsValue(Object)
method.
containsValue
in interface Map
public Set entrySet()
Map.entrySet()
method.
entrySet
in interface Map
public boolean equals(Object m)
Map.equals(Object)
method.
equals
in interface Map
equals
in class Object
public Object get(Object key)
Map.get(Object)
method.
get
in interface Map
public int hashCode()
Map.hashCode()
method.
hashCode
in interface Map
hashCode
in class Object
public boolean isEmpty()
Map.isEmpty()
method.
isEmpty
in interface Map
public Set keySet()
Map.keySet()
method.
keySet
in interface Map
public Object put(Object key, Object value)
Map.put(Object,Object)
method.
put
in interface Map
public void putAll(Map t)
Map.putAll(Map)
method.
putAll
in interface Map
public Object remove(Object key)
Map.remove(Object)
method.
remove
in interface Map
public int size()
Map.size()
method.
size
in interface Map
public Collection values()
Map.values()
method.
values
in interface Map
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |