Class ProxyMap
- java.lang.Object
-
- org.apache.commons.collections.ProxyMap
-
- All Implemented Interfaces:
java.util.Map
public abstract class ProxyMap extends java.lang.Object implements java.util.MapDeprecated.Moved to map subpackage as AbstractMapDecorator. It will be removed in v4.0.This
Mapwraps anotherMapimplementation, using the wrapped instance for its default implementation. This class is used as a framework on which to build to extensions for its wrappedMapobject 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 voidclear()Deprecated.Invokes the underlyingMap.clear()method.booleancontainsKey(java.lang.Object key)Deprecated.Invokes the underlyingMap.containsKey(Object)method.booleancontainsValue(java.lang.Object value)Deprecated.Invokes the underlyingMap.containsValue(Object)method.java.util.SetentrySet()Deprecated.Invokes the underlyingMap.entrySet()method.booleanequals(java.lang.Object m)Deprecated.Invokes the underlyingMap.equals(Object)method.java.lang.Objectget(java.lang.Object key)Deprecated.Invokes the underlyingMap.get(Object)method.inthashCode()Deprecated.Invokes the underlyingMap.hashCode()method.booleanisEmpty()Deprecated.Invokes the underlyingMap.isEmpty()method.java.util.SetkeySet()Deprecated.Invokes the underlyingMap.keySet()method.java.lang.Objectput(java.lang.Object key, java.lang.Object value)Deprecated.Invokes the underlyingMap.put(Object,Object)method.voidputAll(java.util.Map t)Deprecated.Invokes the underlyingMap.putAll(Map)method.java.lang.Objectremove(java.lang.Object key)Deprecated.Invokes the underlyingMap.remove(Object)method.intsize()Deprecated.Invokes the underlyingMap.size()method.java.util.Collectionvalues()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
Mapparameter in collections constructors.- Parameters:
map- theMapto delegate to
-
-
Method Detail
-
clear
public void clear()
Deprecated.Invokes the underlyingMap.clear()method.- Specified by:
clearin interfacejava.util.Map
-
containsKey
public boolean containsKey(java.lang.Object key)
Deprecated.Invokes the underlyingMap.containsKey(Object)method.- Specified by:
containsKeyin interfacejava.util.Map
-
containsValue
public boolean containsValue(java.lang.Object value)
Deprecated.Invokes the underlyingMap.containsValue(Object)method.- Specified by:
containsValuein interfacejava.util.Map
-
entrySet
public java.util.Set entrySet()
Deprecated.Invokes the underlyingMap.entrySet()method.- Specified by:
entrySetin interfacejava.util.Map
-
equals
public boolean equals(java.lang.Object m)
Deprecated.Invokes the underlyingMap.equals(Object)method.- Specified by:
equalsin interfacejava.util.Map- Overrides:
equalsin classjava.lang.Object
-
get
public java.lang.Object get(java.lang.Object key)
Deprecated.Invokes the underlyingMap.get(Object)method.- Specified by:
getin interfacejava.util.Map
-
hashCode
public int hashCode()
Deprecated.Invokes the underlyingMap.hashCode()method.- Specified by:
hashCodein interfacejava.util.Map- Overrides:
hashCodein classjava.lang.Object
-
isEmpty
public boolean isEmpty()
Deprecated.Invokes the underlyingMap.isEmpty()method.- Specified by:
isEmptyin interfacejava.util.Map
-
keySet
public java.util.Set keySet()
Deprecated.Invokes the underlyingMap.keySet()method.- Specified by:
keySetin 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:
putin interfacejava.util.Map
-
putAll
public void putAll(java.util.Map t)
Deprecated.Invokes the underlyingMap.putAll(Map)method.- Specified by:
putAllin interfacejava.util.Map
-
remove
public java.lang.Object remove(java.lang.Object key)
Deprecated.Invokes the underlyingMap.remove(Object)method.- Specified by:
removein interfacejava.util.Map
-
size
public int size()
Deprecated.Invokes the underlyingMap.size()method.- Specified by:
sizein interfacejava.util.Map
-
values
public java.util.Collection values()
Deprecated.Invokes the underlyingMap.values()method.- Specified by:
valuesin interfacejava.util.Map
-
-