Class ProxyMap
- All Implemented Interfaces:
Map
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.
- Since:
- Commons Collections 2.0
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()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.entrySet()Deprecated.Invokes the underlyingMap.entrySet()method.booleanDeprecated.Invokes the underlyingMap.equals(Object)method.Deprecated.Invokes the underlyingMap.get(Object)method.inthashCode()Deprecated.Invokes the underlyingMap.hashCode()method.booleanisEmpty()Deprecated.Invokes the underlyingMap.isEmpty()method.keySet()Deprecated.Invokes the underlyingMap.keySet()method.Deprecated.Invokes the underlyingMap.put(Object,Object)method.voidDeprecated.Invokes the underlyingMap.putAll(Map)method.Deprecated.Invokes the underlyingMap.remove(Object)method.intsize()Deprecated.Invokes the underlyingMap.size()method.values()Deprecated.Invokes the underlyingMap.values()method.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
ProxyMap
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 Details
-
clear
public void clear()Deprecated.Invokes the underlyingMap.clear()method. -
containsKey
Deprecated.Invokes the underlyingMap.containsKey(Object)method.- Specified by:
containsKeyin interfaceMap
-
containsValue
Deprecated.Invokes the underlyingMap.containsValue(Object)method.- Specified by:
containsValuein interfaceMap
-
entrySet
Deprecated.Invokes the underlyingMap.entrySet()method. -
equals
Deprecated.Invokes the underlyingMap.equals(Object)method. -
get
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
Deprecated.Invokes the underlyingMap.keySet()method. -
put
Deprecated.Invokes the underlyingMap.put(Object,Object)method. -
putAll
Deprecated.Invokes the underlyingMap.putAll(Map)method. -
remove
Deprecated.Invokes the underlyingMap.remove(Object)method. -
size
public int size()Deprecated.Invokes the underlyingMap.size()method. -
values
Deprecated.Invokes the underlyingMap.values()method.
-