Class ProxyMap

  • All Implemented Interfaces:
    Map

    public abstract class ProxyMap
    extends Object
    implements Map
    Deprecated.
    Moved to map subpackage as AbstractMapDecorator. It will be removed in v4.0.

    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
    • Field Detail

      • map

        protected Map map
        Deprecated.
        The Map to delegate to.
    • Constructor Detail

      • ProxyMap

        public ProxyMap​(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