Class AbstractMapDecorator

java.lang.Object
org.apache.commons.collections.map.AbstractMapDecorator
All Implemented Interfaces:
Map
Direct Known Subclasses:
AbstractBidiMapDecorator, AbstractOrderedMapDecorator, AbstractSortedMapDecorator, DefaultedMap, FixedSizeMap, LazyMap, ListOrderedMap, MultiValueMap, PredicatedMap, TransformedMap, UnmodifiableMap

@Deprecated(since="2021-04-30") public abstract class AbstractMapDecorator extends Object implements Map
Deprecated.
Apache Commons Collections version 3.x is being deprecated from AEMaaCS. The upgraded version 4.4 of Commons Collections is already included as replacement. Customers are advised to upgrade to this version of the library. Please note: the package name was changed to org.apache.commons.collections4. Further note that there are AEM APIs currently exposing the old collections classes; these will be updated in upcoming releases.
Provides a base decorator that enables additional functionality to be added to a Map via decoration.

Methods are forwarded directly to the decorated map.

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 3.0
  • Constructor Details

    • AbstractMapDecorator

      public AbstractMapDecorator(Map map)
      Deprecated.
      Constructor that wraps (not copies).
      Parameters:
      map - the map to decorate, must not be null
      Throws:
      IllegalArgumentException - if the collection is null
  • Method Details

    • clear

      public void clear()
      Deprecated.
      Specified by:
      clear in interface Map
    • containsKey

      public boolean containsKey(Object key)
      Deprecated.
      Specified by:
      containsKey in interface Map
    • containsValue

      public boolean containsValue(Object value)
      Deprecated.
      Specified by:
      containsValue in interface Map
    • entrySet

      public Set entrySet()
      Deprecated.
      Specified by:
      entrySet in interface Map
    • get

      public Object get(Object key)
      Deprecated.
      Specified by:
      get in interface Map
    • isEmpty

      public boolean isEmpty()
      Deprecated.
      Specified by:
      isEmpty in interface Map
    • keySet

      public Set keySet()
      Deprecated.
      Specified by:
      keySet in interface Map
    • put

      public Object put(Object key, Object value)
      Deprecated.
      Specified by:
      put in interface Map
    • putAll

      public void putAll(Map mapToCopy)
      Deprecated.
      Specified by:
      putAll in interface Map
    • remove

      public Object remove(Object key)
      Deprecated.
      Specified by:
      remove in interface Map
    • size

      public int size()
      Deprecated.
      Specified by:
      size in interface Map
    • values

      public Collection values()
      Deprecated.
      Specified by:
      values in interface Map
    • equals

      public boolean equals(Object object)
      Deprecated.
      Specified by:
      equals in interface Map
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Deprecated.
      Specified by:
      hashCode in interface Map
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object