Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

oracle.adfnmc.java.util
Interface SortedMap

All Superinterfaces:
Map
All Known Implementing Classes:
TreeMap

public interface SortedMap
extends Map

SortedMap is a Map where the iterators sequence in order of the sorted keys.


Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.adfnmc.java.util.Map
Map.Entry
 
Method Summary
 Comparator comparator()
          Answers the Comparator used to compare elements in this SortedMap.
 java.lang.Object firstKey()
          Answer the first sorted key in this SortedMap.
 SortedMap headMap(java.lang.Object endKey)
          Answers a SortedMap of the specified portion of this SortedMap which contains keys less than the end key.
 java.lang.Object lastKey()
          Answers the last sorted key in this SortedMap.
 SortedMap subMap(java.lang.Object startKey, java.lang.Object 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.
 SortedMap tailMap(java.lang.Object startKey)
          Answers a SortedMap of the specified portion of this SortedMap which contains keys greater or equal to the start key.
 
Methods inherited from interface oracle.adfnmc.java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

comparator

Comparator comparator()
Answers the Comparator used to compare elements in this SortedMap.

Returns:
a Comparator or null if the natural order is used

firstKey

java.lang.Object firstKey()
Answer the first sorted key in this SortedMap.

Returns:
the first sorted key
Throws:
NoSuchElementException - when this SortedMap is empty

headMap

SortedMap headMap(java.lang.Object endKey)
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
Returns:
a submap where the keys are less than endKey
Throws:
java.lang.ClassCastException - when the class of the end key is inappropriate for this SubMap
java.lang.NullPointerException - when the end key is null and this SortedMap does not support null keys

lastKey

java.lang.Object lastKey()
Answers the last sorted key in this SortedMap.

Returns:
the last sorted key
Throws:
NoSuchElementException - when this SortedMap is empty

subMap

SortedMap subMap(java.lang.Object startKey,
                 java.lang.Object 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. 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
endKey - the end key
Returns:
a submap where the keys are greater or equal to startKey and less than endKey
Throws:
java.lang.ClassCastException - when the class of the start or end key is inappropriate for this SubMap
java.lang.NullPointerException - when the start or end key is null and this SortedMap does not support null keys
java.lang.IllegalArgumentException - when the start key is greater than the end key

tailMap

SortedMap tailMap(java.lang.Object startKey)
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
Returns:
a submap where the keys are greater or equal to startKey
Throws:
java.lang.ClassCastException - when the class of the start key is inappropriate for this SubMap
java.lang.NullPointerException - when the start key is null and this SortedMap does not support null keys

Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client
11g Release 1 (11.1.1)

E17503-02

Copyright © 2011, Oracle and/or its affiliates. All rights reserved.