Class ProxyMap
- java.lang.Object
-
- org.apache.commons.collections.ProxyMap
-
- All Implemented Interfaces:
Map
public abstract class ProxyMap extends Object implements Map
Deprecated.Moved to map subpackage as AbstractMapDecorator. It will be removed in v4.0.This
Map
wraps anotherMap
implementation, using the wrapped instance for its default implementation. This class is used as a framework on which to build to extensions for its wrappedMap
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()
orvalues()
. 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.- Since:
- Commons Collections 2.0
- Version:
- $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
- Author:
- Daniel Rall, Stephen Colebourne
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.Invokes the underlyingMap.clear()
method.boolean
containsKey(Object key)
Deprecated.Invokes the underlyingMap.containsKey(Object)
method.boolean
containsValue(Object value)
Deprecated.Invokes the underlyingMap.containsValue(Object)
method.Set
entrySet()
Deprecated.Invokes the underlyingMap.entrySet()
method.boolean
equals(Object m)
Deprecated.Invokes the underlyingMap.equals(Object)
method.Object
get(Object key)
Deprecated.Invokes the underlyingMap.get(Object)
method.int
hashCode()
Deprecated.Invokes the underlyingMap.hashCode()
method.boolean
isEmpty()
Deprecated.Invokes the underlyingMap.isEmpty()
method.Set
keySet()
Deprecated.Invokes the underlyingMap.keySet()
method.Object
put(Object key, Object value)
Deprecated.Invokes the underlyingMap.put(Object,Object)
method.void
putAll(Map t)
Deprecated.Invokes the underlyingMap.putAll(Map)
method.Object
remove(Object key)
Deprecated.Invokes the underlyingMap.remove(Object)
method.int
size()
Deprecated.Invokes the underlyingMap.size()
method.Collection
values()
Deprecated.Invokes the underlyingMap.values()
method.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Field Detail
-
map
protected Map map
Deprecated.TheMap
to delegate to.
-
-
Constructor Detail
-
ProxyMap
public ProxyMap(Map map)
Deprecated.Constructor that uses the specified map to delegate to.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.- Parameters:
map
- theMap
to delegate to
-
-
Method Detail
-
clear
public void clear()
Deprecated.Invokes the underlyingMap.clear()
method.
-
containsKey
public boolean containsKey(Object key)
Deprecated.Invokes the underlyingMap.containsKey(Object)
method.- Specified by:
containsKey
in interfaceMap
-
containsValue
public boolean containsValue(Object value)
Deprecated.Invokes the underlyingMap.containsValue(Object)
method.- Specified by:
containsValue
in interfaceMap
-
entrySet
public Set entrySet()
Deprecated.Invokes the underlyingMap.entrySet()
method.
-
equals
public boolean equals(Object m)
Deprecated.Invokes the underlyingMap.equals(Object)
method.
-
get
public Object get(Object key)
Deprecated.Invokes the underlyingMap.get(Object)
method.
-
hashCode
public int hashCode()
Deprecated.Invokes the underlyingMap.hashCode()
method.
-
isEmpty
public boolean isEmpty()
Deprecated.Invokes the underlyingMap.isEmpty()
method.
-
keySet
public Set keySet()
Deprecated.Invokes the underlyingMap.keySet()
method.
-
put
public Object put(Object key, Object value)
Deprecated.Invokes the underlyingMap.put(Object,Object)
method.
-
putAll
public void putAll(Map t)
Deprecated.Invokes the underlyingMap.putAll(Map)
method.
-
remove
public Object remove(Object key)
Deprecated.Invokes the underlyingMap.remove(Object)
method.
-
size
public int size()
Deprecated.Invokes the underlyingMap.size()
method.
-
values
public Collection values()
Deprecated.Invokes the underlyingMap.values()
method.
-
-