public abstract class AbstractSortedMapDecorator extends AbstractMapDecorator implements java.util.SortedMap
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.
map| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSortedMapDecorator()
Constructor only used in deserialization, do not use otherwise.
|
|
AbstractSortedMapDecorator(java.util.SortedMap map)
Constructor that wraps (not copies).
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Comparator |
comparator() |
java.lang.Object |
firstKey() |
protected java.util.SortedMap |
getSortedMap()
Gets the map being decorated.
|
java.util.SortedMap |
headMap(java.lang.Object toKey) |
java.lang.Object |
lastKey() |
java.util.SortedMap |
subMap(java.lang.Object fromKey,
java.lang.Object toKey) |
java.util.SortedMap |
tailMap(java.lang.Object fromKey) |
clear, containsKey, containsValue, entrySet, equals, get, getMap, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, valuesprotected AbstractSortedMapDecorator()
public AbstractSortedMapDecorator(java.util.SortedMap map)
map - the map to decorate, must not be nulljava.lang.IllegalArgumentException - if the collection is nullprotected java.util.SortedMap getSortedMap()
public java.util.Comparator comparator()
comparator in interface java.util.SortedMappublic java.lang.Object firstKey()
firstKey in interface java.util.SortedMappublic java.util.SortedMap headMap(java.lang.Object toKey)
headMap in interface java.util.SortedMappublic java.lang.Object lastKey()
lastKey in interface java.util.SortedMappublic java.util.SortedMap subMap(java.lang.Object fromKey,
java.lang.Object toKey)
subMap in interface java.util.SortedMappublic java.util.SortedMap tailMap(java.lang.Object fromKey)
tailMap in interface java.util.SortedMapCopyright © 2001-2025 Apache Software Foundation. All Rights Reserved.