Class ProxyMap
- java.lang.Object
-
- org.apache.commons.collections.ProxyMap
-
- All Implemented Interfaces:
Map
@Deprecated(since="2021-04-30") public abstract class ProxyMap extends Object implements Map
Deprecated.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidclear()Deprecated.Invokes the underlyingMap.clear()method.booleancontainsKey(Object key)Deprecated.Invokes the underlyingMap.containsKey(Object)method.booleancontainsValue(Object value)Deprecated.Invokes the underlyingMap.containsValue(Object)method.SetentrySet()Deprecated.Invokes the underlyingMap.entrySet()method.booleanequals(Object m)Deprecated.Invokes the underlyingMap.equals(Object)method.Objectget(Object key)Deprecated.Invokes the underlyingMap.get(Object)method.inthashCode()Deprecated.Invokes the underlyingMap.hashCode()method.booleanisEmpty()Deprecated.Invokes the underlyingMap.isEmpty()method.SetkeySet()Deprecated.Invokes the underlyingMap.keySet()method.Objectput(Object key, Object value)Deprecated.Invokes the underlyingMap.put(Object,Object)method.voidputAll(Map t)Deprecated.Invokes the underlyingMap.putAll(Map)method.Objectremove(Object key)Deprecated.Invokes the underlyingMap.remove(Object)method.intsize()Deprecated.Invokes the underlyingMap.size()method.Collectionvalues()Deprecated.Invokes the underlyingMap.values()method.-
Methods inherited from class java.lang.Object
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
-
-
-
-
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
Mapparameter in collections constructors.- Parameters:
map- theMapto 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:
containsKeyin interfaceMap
-
containsValue
public boolean containsValue(Object value)
Deprecated.Invokes the underlyingMap.containsValue(Object)method.- Specified by:
containsValuein 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.
-
-