Class AbstractSortedMapDecorator

  • All Implemented Interfaces:
    java.util.Map, java.util.SortedMap
    Direct Known Subclasses:
    FixedSizeSortedMap, UnmodifiableSortedMap

    @Deprecated(since="2021-04-30")
    public abstract class AbstractSortedMapDecorator
    extends AbstractMapDecorator
    implements java.util.SortedMap
    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 the map views. 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
      AbstractSortedMapDecorator​(java.util.SortedMap map)
      Deprecated.
      Constructor that wraps (not copies).
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.util.Comparator comparator()
      Deprecated.
       
      java.lang.Object firstKey()
      Deprecated.
       
      java.util.SortedMap headMap​(java.lang.Object toKey)
      Deprecated.
       
      java.lang.Object lastKey()
      Deprecated.
       
      java.util.SortedMap subMap​(java.lang.Object fromKey, java.lang.Object toKey)
      Deprecated.
       
      java.util.SortedMap tailMap​(java.lang.Object fromKey)
      Deprecated.
       
      • Methods inherited from class java.lang.Object

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

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size
      • Methods inherited from interface java.util.SortedMap

        entrySet, keySet, values
    • Constructor Detail

      • AbstractSortedMapDecorator

        public AbstractSortedMapDecorator​(java.util.SortedMap 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

      • comparator

        public java.util.Comparator comparator()
        Deprecated.
        Specified by:
        comparator in interface java.util.SortedMap
      • firstKey

        public java.lang.Object firstKey()
        Deprecated.
        Specified by:
        firstKey in interface java.util.SortedMap
      • headMap

        public java.util.SortedMap headMap​(java.lang.Object toKey)
        Deprecated.
        Specified by:
        headMap in interface java.util.SortedMap
      • lastKey

        public java.lang.Object lastKey()
        Deprecated.
        Specified by:
        lastKey in interface java.util.SortedMap
      • subMap

        public java.util.SortedMap subMap​(java.lang.Object fromKey,
                                          java.lang.Object toKey)
        Deprecated.
        Specified by:
        subMap in interface java.util.SortedMap
      • tailMap

        public java.util.SortedMap tailMap​(java.lang.Object fromKey)
        Deprecated.
        Specified by:
        tailMap in interface java.util.SortedMap