## org.apache.commons.collections
Class ProxyMap

    java.lang.Object
      org.apache.commons.collections.ProxyMap

All Implemented Interfaces:
  java.util.Map

Deprecated. Moved to map subpackage as AbstractMapDecorator. It will be removed in v4.0.

    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.

Since:
  Commons Collections 2.0
Version:
  $Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
Author:
  Daniel Rall, Stephen Colebourne

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry`

Field Summary
`protected java.util.Map` `map` Deprecated. The `Map` to delegate to.

Constructor Summary
`ProxyMap(java.util.Map map)` Deprecated. Constructor that uses the specified map to delegate to.

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### map

    protected java.util.Map map

  Deprecated.
  The `Map` to delegate to.

Constructor Detail

### ProxyMap

    public ProxyMap(java.util.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 `Map` parameter in collections constructors.

  Parameters:
    `map` - the `Map` to delegate to

Method Detail

### clear

    public void clear()

  Deprecated.
  Invokes the underlying `Map.clear()` method.

  Specified by:
    `clear` in interface `java.util.Map`

### containsKey

    public boolean containsKey(java.lang.Object key)

  Deprecated.
  Invokes the underlying `Map.containsKey(Object)` method.

  Specified by:
    `containsKey` in interface `java.util.Map`

### containsValue

    public boolean containsValue(java.lang.Object value)

  Deprecated.
  Invokes the underlying `Map.containsValue(Object)` method.

  Specified by:
    `containsValue` in interface `java.util.Map`

### entrySet

    public java.util.Set entrySet()

  Deprecated.
  Invokes the underlying `Map.entrySet()` method.

  Specified by:
    `entrySet` in interface `java.util.Map`

### equals

    public boolean equals(java.lang.Object m)

  Deprecated.
  Invokes the underlying `Map.equals(Object)` method.

  Specified by:
    `equals` in interface `java.util.Map`
  Overrides:
    `equals` in class `java.lang.Object`

### get

    public java.lang.Object get(java.lang.Object key)

  Deprecated.
  Invokes the underlying `Map.get(Object)` method.

  Specified by:
    `get` in interface `java.util.Map`

### hashCode

    public int hashCode()

  Deprecated.
  Invokes the underlying `Map.hashCode()` method.

  Specified by:
    `hashCode` in interface `java.util.Map`
  Overrides:
    `hashCode` in class `java.lang.Object`

### isEmpty

    public boolean isEmpty()

  Deprecated.
  Invokes the underlying `Map.isEmpty()` method.

  Specified by:
    `isEmpty` in interface `java.util.Map`

### keySet

    public java.util.Set keySet()

  Deprecated.
  Invokes the underlying `Map.keySet()` method.

  Specified by:
    `keySet` in interface `java.util.Map`

### put

    public java.lang.Object put(java.lang.Object key,
                                java.lang.Object value)

  Deprecated.
  Invokes the underlying `Map.put(Object,Object)` method.

  Specified by:
    `put` in interface `java.util.Map`

### putAll

    public void putAll(java.util.Map t)

  Deprecated.
  Invokes the underlying `Map.putAll(Map)` method.

  Specified by:
    `putAll` in interface `java.util.Map`

### remove

    public java.lang.Object remove(java.lang.Object key)

  Deprecated.
  Invokes the underlying `Map.remove(Object)` method.

  Specified by:
    `remove` in interface `java.util.Map`

### size

    public int size()

  Deprecated.
  Invokes the underlying `Map.size()` method.

  Specified by:
    `size` in interface `java.util.Map`

### values

    public java.util.Collection values()

  Deprecated.
  Invokes the underlying `Map.values()` method.

  Specified by:
    `values` in interface `java.util.Map`

Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.