public abstract class AbstractSortedMapDecorator extends AbstractMapDecorator implements 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(SortedMap map)
Constructor that wraps (not copies).
|
Modifier and Type | Method and Description |
---|---|
Comparator |
comparator() |
Object |
firstKey() |
protected SortedMap |
getSortedMap()
Gets the map being decorated.
|
SortedMap |
headMap(Object toKey) |
Object |
lastKey() |
SortedMap |
subMap(Object fromKey,
Object toKey) |
SortedMap |
tailMap(Object fromKey) |
clear, containsKey, containsValue, entrySet, equals, get, getMap, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
protected AbstractSortedMapDecorator()
public AbstractSortedMapDecorator(SortedMap map)
map
- the map to decorate, must not be nullIllegalArgumentException
- if the collection is nullprotected SortedMap getSortedMap()
public Comparator comparator()
comparator
in interface SortedMap
Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.