Class AbstractMapDecorator

  • All Implemented Interfaces:
    java.util.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 java.lang.Object
    implements java.util.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
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractMapDecorator​(java.util.Map map)
      Deprecated.
      Constructor that wraps (not copies).
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void clear()
      Deprecated.
       
      boolean containsKey​(java.lang.Object key)
      Deprecated.
       
      boolean containsValue​(java.lang.Object value)
      Deprecated.
       
      java.util.Set entrySet()
      Deprecated.
       
      boolean equals​(java.lang.Object object)
      Deprecated.
       
      java.lang.Object get​(java.lang.Object key)
      Deprecated.
       
      int hashCode()
      Deprecated.
       
      boolean isEmpty()
      Deprecated.
       
      java.util.Set keySet()
      Deprecated.
       
      java.lang.Object put​(java.lang.Object key, java.lang.Object value)
      Deprecated.
       
      void putAll​(java.util.Map mapToCopy)
      Deprecated.
       
      java.lang.Object remove​(java.lang.Object key)
      Deprecated.
       
      int size()
      Deprecated.
       
      java.lang.String toString()
      Deprecated.
       
      java.util.Collection values()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Constructor Detail

      • AbstractMapDecorator

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

      • clear

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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