| java.util.SortedMap
SortedMap | public interface SortedMap extends Map<K, V>(Code) | | SortedMap is a Map where the iterators sequence in order of the sorted keys.
|
Method Summary | |
public Comparator<? super K> | comparator() Answers the Comparator used to compare elements in this SortedMap. | public K | firstKey() Answer the first sorted key in this SortedMap. | public SortedMap<K, V> | headMap(K endKey) Answers a SortedMap of the specified portion of this
SortedMap which contains keys less than the end key. | public K | lastKey() Answers the last sorted key in this SortedMap. | public SortedMap<K, V> | subMap(K startKey, K endKey) Answers a SortedMap of the specified portion of this SortedMap which
contains keys greater or equal to the start key but less than the end
key. | public SortedMap<K, V> | tailMap(K startKey) Answers a SortedMap of the specified portion of this SortedMap which
contains keys greater or equal to the start key. |
comparator | public Comparator<? super K> comparator()(Code) | | Answers the Comparator used to compare elements in this SortedMap.
a Comparator or null if the natural order is used |
firstKey | public K firstKey()(Code) | | Answer the first sorted key in this SortedMap.
the first sorted key exception: NoSuchElementException - when this SortedMap is empty |
headMap | public SortedMap<K, V> headMap(K endKey)(Code) | | Answers a SortedMap of the specified portion of this
SortedMap which contains keys less than the end key. Users
should be aware that the return value is actually backed by this
SortedMap . Hence any modifications made to one will be
immediately visible to the other.
Parameters: endKey - the end key a submap where the keys are less than endKey exception: ClassCastException - when the class of the end key is inappropriate for thisSubMap exception: NullPointerException - when the end key is null and this SortedMap does notsupport null keys |
lastKey | public K lastKey()(Code) | | Answers the last sorted key in this SortedMap.
the last sorted key exception: NoSuchElementException - when this SortedMap is empty |
subMap | public SortedMap<K, V> subMap(K startKey, K endKey)(Code) | | Answers a SortedMap of the specified portion of this SortedMap which
contains keys greater or equal to the start key but less than the end
key. Users should be aware that the return value is actually backed by
this SortedMap . Hence any modifications made to one will
be immediately visible to the other.
Parameters: startKey - the start key Parameters: endKey - the end key a submap where the keys are greater or equal tostartKey and less than endKey exception: ClassCastException - when the class of the start or end key is inappropriatefor this SubMap exception: NullPointerException - when the start or end key is null and this SortedMap doesnot support null keys exception: IllegalArgumentException - when the start key is greater than the end key |
tailMap | public SortedMap<K, V> tailMap(K startKey)(Code) | | Answers a SortedMap of the specified portion of this SortedMap which
contains keys greater or equal to the start key. The returned SortedMap
is backed by this SortedMap so changes to one are reflected by the other.
Parameters: startKey - the start key a submap where the keys are greater or equal tostartKey exception: ClassCastException - when the class of the start key is inappropriate for thisSubMap exception: NullPointerException - when the start key is null and this SortedMap does notsupport null keys |
|
|