Class AbstractSortedBidiMapDecorator

All Implemented Interfaces:
Map, SequencedMap, SortedMap, BidiMap, IterableMap, OrderedBidiMap, OrderedMap, SortedBidiMap
Direct Known Subclasses:
UnmodifiableSortedBidiMap

@Deprecated(since="2021-04-30") public abstract class AbstractSortedBidiMapDecorator extends AbstractOrderedBidiMapDecorator implements SortedBidiMap
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 SortedBidiMap 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 inverse 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

    • AbstractSortedBidiMapDecorator

      public AbstractSortedBidiMapDecorator(SortedBidiMap 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

    • inverseSortedBidiMap

      public SortedBidiMap inverseSortedBidiMap()
      Deprecated.
      Description copied from interface: SortedBidiMap
      Gets a view of this map where the keys and values are reversed.

      Changes to one map will be visible in the other and vice versa. This enables both directions of the map to be accessed as a SortedMap.

      Implementations should seek to avoid creating a new object every time this method is called. See AbstractMap.values() etc. Calling this method on the inverse map should return the original.

      The inverse map returned by inverseBidiMap() should be the same object as returned by this method.

      Specified by:
      inverseSortedBidiMap in interface SortedBidiMap
      Returns:
      an inverted bidirectional map
    • comparator

      public Comparator comparator()
      Deprecated.
      Specified by:
      comparator in interface SortedMap
    • subMap

      public SortedMap subMap(Object fromKey, Object toKey)
      Deprecated.
      Specified by:
      subMap in interface SortedMap
    • headMap

      public SortedMap headMap(Object toKey)
      Deprecated.
      Specified by:
      headMap in interface SortedMap
    • tailMap

      public SortedMap tailMap(Object fromKey)
      Deprecated.
      Specified by:
      tailMap in interface SortedMap