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

E17503-02

oracle.adfnmc.java.util
Interface SortedSet

All Superinterfaces:
Collection, Iterable, Set
All Known Implementing Classes:
TreeSet

public interface SortedSet
extends Set

SortedSet is a Set which iterates its elements in sorted order.


Method Summary
 Comparator comparator()
          Answers the Comparator used to compare elements in this SortedSet.
 java.lang.Object first()
          Answer the first sorted element in this SortedSet.
 SortedSet headSet(java.lang.Object end)
          Answers a SortedSet of the specified portion of this SortedSet which contains elements less than the end element.
 java.lang.Object last()
          Answer the last sorted element in this SortedSet.
 SortedSet subSet(java.lang.Object start, java.lang.Object end)
          Answers a SortedSet of the specified portion of this SortedSet which contains elements greater or equal to the start element but less than the end element.
 SortedSet tailSet(java.lang.Object start)
          Answers a SortedSet of the specified portion of this SortedSet which contains elements greater or equal to the start element.
 
Methods inherited from interface oracle.adfnmc.java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

comparator

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

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

first

java.lang.Object first()
Answer the first sorted element in this SortedSet.

Returns:
the first sorted element
Throws:
NoSuchElementException - when this SortedSet is empty

headSet

SortedSet headSet(java.lang.Object end)
Answers a SortedSet of the specified portion of this SortedSet which contains elements less than the end element. The returned SortedSet is backed by this SortedSet so changes to one are reflected by the other.

Parameters:
end - the end element
Returns:
a subset where the elements are less than end
Throws:
java.lang.ClassCastException - when the class of the end element is inappropriate for this SubSet
java.lang.NullPointerException - when the end element is null and this SortedSet does not support null elements

last

java.lang.Object last()
Answer the last sorted element in this SortedSet.

Returns:
the last sorted element
Throws:
NoSuchElementException - when this SortedSet is empty

subSet

SortedSet subSet(java.lang.Object start,
                 java.lang.Object end)
Answers a SortedSet of the specified portion of this SortedSet which contains elements greater or equal to the start element but less than the end element. The returned SortedSet is backed by this SortedMap so changes to one are reflected by the other.

Parameters:
start - the start element
end - the end element
Returns:
a subset where the elements are greater or equal to start and less than end
Throws:
java.lang.ClassCastException - when the class of the start or end element is inappropriate for this SubSet
java.lang.NullPointerException - when the start or end element is null and this SortedSet does not support null elements
java.lang.IllegalArgumentException - when the start element is greater than the end element

tailSet

SortedSet tailSet(java.lang.Object start)
Answers a SortedSet of the specified portion of this SortedSet which contains elements greater or equal to the start element. The returned SortedSet is backed by this SortedSet so changes to one are reflected by the other.

Parameters:
start - the start element
Returns:
a subset where the elements are greater or equal to start
Throws:
java.lang.ClassCastException - when the class of the start element is inappropriate for this SubSet
java.lang.NullPointerException - when the start element is null and this SortedSet does not support null elements

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.