public abstract class ProxyMap
extends java.lang.Object
implements java.util.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.
Constructor and Description |
---|
ProxyMap(java.util.Map map)
Deprecated.
Constructor that uses the specified map to delegate to.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Deprecated.
Invokes the underlying
Map.clear() method. |
boolean |
containsKey(java.lang.Object key)
Deprecated.
Invokes the underlying
Map.containsKey(Object) method. |
boolean |
containsValue(java.lang.Object value)
Deprecated.
Invokes the underlying
Map.containsValue(Object) method. |
java.util.Set |
entrySet()
Deprecated.
Invokes the underlying
Map.entrySet() method. |
boolean |
equals(java.lang.Object m)
Deprecated.
Invokes the underlying
Map.equals(Object) method. |
java.lang.Object |
get(java.lang.Object key)
Deprecated.
Invokes the underlying
Map.get(Object) method. |
int |
hashCode()
Deprecated.
Invokes the underlying
Map.hashCode() method. |
boolean |
isEmpty()
Deprecated.
Invokes the underlying
Map.isEmpty() method. |
java.util.Set |
keySet()
Deprecated.
Invokes the underlying
Map.keySet() method. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Deprecated.
Invokes the underlying
Map.put(Object,Object) method. |
void |
putAll(java.util.Map t)
Deprecated.
Invokes the underlying
Map.putAll(Map) method. |
java.lang.Object |
remove(java.lang.Object key)
Deprecated.
Invokes the underlying
Map.remove(Object) method. |
int |
size()
Deprecated.
Invokes the underlying
Map.size() method. |
java.util.Collection |
values()
Deprecated.
Invokes the underlying
Map.values() method. |
public ProxyMap(java.util.Map map)
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.
map
- the Map
to delegate topublic void clear()
Map.clear()
method.clear
in interface java.util.Map
public boolean containsKey(java.lang.Object key)
Map.containsKey(Object)
method.containsKey
in interface java.util.Map
public boolean containsValue(java.lang.Object value)
Map.containsValue(Object)
method.containsValue
in interface java.util.Map
public java.util.Set entrySet()
Map.entrySet()
method.entrySet
in interface java.util.Map
public boolean equals(java.lang.Object m)
Map.equals(Object)
method.equals
in interface java.util.Map
equals
in class java.lang.Object
public java.lang.Object get(java.lang.Object key)
Map.get(Object)
method.get
in interface java.util.Map
public int hashCode()
Map.hashCode()
method.hashCode
in interface java.util.Map
hashCode
in class java.lang.Object
public boolean isEmpty()
Map.isEmpty()
method.isEmpty
in interface java.util.Map
public java.util.Set keySet()
Map.keySet()
method.keySet
in interface java.util.Map
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
Map.put(Object,Object)
method.put
in interface java.util.Map
public void putAll(java.util.Map t)
Map.putAll(Map)
method.putAll
in interface java.util.Map
public java.lang.Object remove(java.lang.Object key)
Map.remove(Object)
method.remove
in interface java.util.Map
public int size()
Map.size()
method.size
in interface java.util.Map
public java.util.Collection values()
Map.values()
method.values
in interface java.util.Map
Copyright © 2010 - 2020 Adobe. All Rights Reserved