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
- Version:
- $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
- Author:
- Daniel Rall, Stephen Colebourne
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.entrySet()
Deprecated.Invokes the underlyingMap.entrySet()
method.boolean
Deprecated.Invokes the underlyingMap.equals(Object)
method.Deprecated.Invokes the underlyingMap.get(Object)
method.int
hashCode()
Deprecated.Invokes the underlyingMap.hashCode()
method.boolean
isEmpty()
Deprecated.Invokes the underlyingMap.isEmpty()
method.keySet()
Deprecated.Invokes the underlyingMap.keySet()
method.Deprecated.Invokes the underlyingMap.put(Object,Object)
method.void
Deprecated.Invokes the underlyingMap.putAll(Map)
method.Deprecated.Invokes the underlyingMap.remove(Object)
method.int
size()
Deprecated.Invokes the underlyingMap.size()
method.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 Details
-
map
Deprecated.TheMap
to delegate to.
-
-
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
Map
parameter in collections constructors.- Parameters:
map
- theMap
to delegate to
-
-
Method Details
-
clear
public void clear()Deprecated.Invokes the underlyingMap.clear()
method. -
containsKey
Deprecated.Invokes the underlyingMap.containsKey(Object)
method.- Specified by:
containsKey
in interfaceMap
-
containsValue
Deprecated.Invokes the underlyingMap.containsValue(Object)
method.- Specified by:
containsValue
in 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.
-