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.
Constructor and Description |
---|
AbstractSortedMapDecorator(java.util.SortedMap map)
Constructor that wraps (not copies).
|
Modifier and Type | Method and Description |
---|---|
java.util.Comparator |
comparator() |
java.lang.Object |
firstKey() |
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) |
public AbstractSortedMapDecorator(java.util.SortedMap map)
map
- the map to decorate, must not be nulljava.lang.IllegalArgumentException
- if the collection is nullpublic java.util.Comparator comparator()
comparator
in interface java.util.SortedMap
public java.lang.Object firstKey()
firstKey
in interface java.util.SortedMap
public java.util.SortedMap headMap(java.lang.Object toKey)
headMap
in interface java.util.SortedMap
public java.lang.Object lastKey()
lastKey
in interface java.util.SortedMap
public java.util.SortedMap subMap(java.lang.Object fromKey, java.lang.Object toKey)
subMap
in interface java.util.SortedMap
public java.util.SortedMap tailMap(java.lang.Object fromKey)
tailMap
in interface java.util.SortedMap
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"