Class AbstractSortedMapDecorator
java.lang.Object
org.apache.commons.collections.map.AbstractMapDecorator
org.apache.commons.collections.map.AbstractSortedMapDecorator
- All Implemented Interfaces:
Map
,SequencedMap
,SortedMap
- Direct Known Subclasses:
DualTreeBidiMap.ViewMap
,FixedSizeSortedMap
,UnmodifiableSortedMap
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
- Version:
- $Revision: 646777 $ $Date: 2008-04-10 14:33:15 +0200 (Thu, 10 Apr 2008) $
- Author:
- Stephen Colebourne
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.commons.collections.map.AbstractMapDecorator
map
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor only used in deserialization, do not use otherwise.Constructor that wraps (not copies). -
Method Summary
Methods inherited from class org.apache.commons.collections.map.AbstractMapDecorator
clear, containsKey, containsValue, entrySet, equals, get, getMap, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
Methods inherited from class java.lang.Object
clone, finalize, 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.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry, sequencedEntrySet, sequencedKeySet, sequencedValues
-
Constructor Details
-
AbstractSortedMapDecorator
protected AbstractSortedMapDecorator()Constructor only used in deserialization, do not use otherwise.- Since:
- Commons Collections 3.1
-
AbstractSortedMapDecorator
Constructor that wraps (not copies).- Parameters:
map
- the map to decorate, must not be null- Throws:
IllegalArgumentException
- if the collection is null
-
-
Method Details
-
getSortedMap
Gets the map being decorated.- Returns:
- the decorated map
-
comparator
- Specified by:
comparator
in interfaceSortedMap
-
firstKey
-
headMap
-
lastKey
-
subMap
-
tailMap
-