public abstract class

ProxyMap

extends Object
implements Map<K, V>
java.lang.Object
   ↳ org.apache.commons.collections.ProxyMap

This class is deprecated.
Moved to map subpackage as AbstractMapDecorator. It will be removed in v4.0.

Class Overview

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.

Summary

Fields
protected Map map The Map to delegate to.
Public Constructors
ProxyMap(Map map)
Constructor that uses the specified map to delegate to.
Public Methods
void clear()
Invokes the underlying clear() method.
boolean containsKey(Object key)
Invokes the underlying containsKey(Object) method.
boolean containsValue(Object value)
Invokes the underlying containsValue(Object) method.
Set entrySet()
Invokes the underlying entrySet() method.
boolean equals(Object m)
Invokes the underlying equals(Object) method.
Object get(Object key)
Invokes the underlying get(Object) method.
int hashCode()
Invokes the underlying hashCode() method.
boolean isEmpty()
Invokes the underlying isEmpty() method.
Set keySet()
Invokes the underlying keySet() method.
Object put(Object key, Object value)
Invokes the underlying put(Object, Object) method.
void putAll(Map t)
Invokes the underlying putAll(Map) method.
Object remove(Object key)
Invokes the underlying remove(Object) method.
int size()
Invokes the underlying size() method.
Collection values()
Invokes the underlying values() method.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Map

Fields

protected Map map

The Map to delegate to.

Public Constructors

public ProxyMap (Map map)

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 the Map to delegate to

Public Methods

public void clear ()

Invokes the underlying clear() method.

public boolean containsKey (Object key)

Invokes the underlying containsKey(Object) method.

public boolean containsValue (Object value)

Invokes the underlying containsValue(Object) method.

public Set entrySet ()

Invokes the underlying entrySet() method.

public boolean equals (Object m)

Invokes the underlying equals(Object) method.

public Object get (Object key)

Invokes the underlying get(Object) method.

public int hashCode ()

Invokes the underlying hashCode() method.

public boolean isEmpty ()

Invokes the underlying isEmpty() method.

public Set keySet ()

Invokes the underlying keySet() method.

public Object put (Object key, Object value)

Invokes the underlying put(Object, Object) method.

public void putAll (Map t)

Invokes the underlying putAll(Map) method.

public Object remove (Object key)

Invokes the underlying remove(Object) method.

public int size ()

Invokes the underlying size() method.

public Collection values ()

Invokes the underlying values() method.