Class ProxyMap
- java.lang.Object
-
- org.apache.commons.collections.ProxyMap
-
- All Implemented Interfaces:
java.util.Map
@Deprecated(since="2021-04-30") public abstract class ProxyMap extends java.lang.Object implements java.util.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
-
-
Constructor Summary
Constructors Constructor Description ProxyMap(java.util.Map map)
Deprecated.Constructor that uses the specified map to delegate to.
-
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(java.lang.Object key)
Deprecated.Invokes the underlyingMap.containsKey(Object)
method.boolean
containsValue(java.lang.Object value)
Deprecated.Invokes the underlyingMap.containsValue(Object)
method.java.util.Set
entrySet()
Deprecated.Invokes the underlyingMap.entrySet()
method.boolean
equals(java.lang.Object m)
Deprecated.Invokes the underlyingMap.equals(Object)
method.java.lang.Object
get(java.lang.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.java.util.Set
keySet()
Deprecated.Invokes the underlyingMap.keySet()
method.java.lang.Object
put(java.lang.Object key, java.lang.Object value)
Deprecated.Invokes the underlyingMap.put(Object,Object)
method.void
putAll(java.util.Map t)
Deprecated.Invokes the underlyingMap.putAll(Map)
method.java.lang.Object
remove(java.lang.Object key)
Deprecated.Invokes the underlyingMap.remove(Object)
method.int
size()
Deprecated.Invokes the underlyingMap.size()
method.java.util.Collection
values()
Deprecated.Invokes the underlyingMap.values()
method.
-
-
-
Constructor Detail
-
ProxyMap
public ProxyMap(java.util.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.- Specified by:
clear
in interfacejava.util.Map
-
containsKey
public boolean containsKey(java.lang.Object key)
Deprecated.Invokes the underlyingMap.containsKey(Object)
method.- Specified by:
containsKey
in interfacejava.util.Map
-
containsValue
public boolean containsValue(java.lang.Object value)
Deprecated.Invokes the underlyingMap.containsValue(Object)
method.- Specified by:
containsValue
in interfacejava.util.Map
-
entrySet
public java.util.Set entrySet()
Deprecated.Invokes the underlyingMap.entrySet()
method.- Specified by:
entrySet
in interfacejava.util.Map
-
equals
public boolean equals(java.lang.Object m)
Deprecated.Invokes the underlyingMap.equals(Object)
method.- Specified by:
equals
in interfacejava.util.Map
- Overrides:
equals
in classjava.lang.Object
-
get
public java.lang.Object get(java.lang.Object key)
Deprecated.Invokes the underlyingMap.get(Object)
method.- Specified by:
get
in interfacejava.util.Map
-
hashCode
public int hashCode()
Deprecated.Invokes the underlyingMap.hashCode()
method.- Specified by:
hashCode
in interfacejava.util.Map
- Overrides:
hashCode
in classjava.lang.Object
-
isEmpty
public boolean isEmpty()
Deprecated.Invokes the underlyingMap.isEmpty()
method.- Specified by:
isEmpty
in interfacejava.util.Map
-
keySet
public java.util.Set keySet()
Deprecated.Invokes the underlyingMap.keySet()
method.- Specified by:
keySet
in interfacejava.util.Map
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
Deprecated.Invokes the underlyingMap.put(Object,Object)
method.- Specified by:
put
in interfacejava.util.Map
-
putAll
public void putAll(java.util.Map t)
Deprecated.Invokes the underlyingMap.putAll(Map)
method.- Specified by:
putAll
in interfacejava.util.Map
-
remove
public java.lang.Object remove(java.lang.Object key)
Deprecated.Invokes the underlyingMap.remove(Object)
method.- Specified by:
remove
in interfacejava.util.Map
-
size
public int size()
Deprecated.Invokes the underlyingMap.size()
method.- Specified by:
size
in interfacejava.util.Map
-
values
public java.util.Collection values()
Deprecated.Invokes the underlyingMap.values()
method.- Specified by:
values
in interfacejava.util.Map
-
-