SortedSet.subSet

Returns a view of the portion of this set whose elements range from <tt>fromElement</tt>, inclusive, to <tt>toElement</tt>, exclusive. (If <tt>fromElement</tt> and <tt>toElement</tt> are equal, the returned set is empty.) The returned set is backed by this set, so changes in the returned set are reflected in this set, and vice-versa. The returned set supports all optional set operations that this set supports.

<p>The returned set will throw an <tt>IllegalArgumentException</tt> on an attempt to insert an element outside its range.

@param fromElement low endpoint (inclusive) of the returned set @param toElement high endpoint (exclusive) of the returned set @return a view of the portion of this set whose elements range from <tt>fromElement</tt>, inclusive, to <tt>toElement</tt>, exclusive @throws ClassCastException if <tt>fromElement</tt> and <tt>toElement</tt> cannot be compared to one another using this set's comparator (or, if the set has no comparator, using natural ordering). Implementations may, but are not required to, throw this exception if <tt>fromElement</tt> or <tt>toElement</tt> cannot be compared to elements currently in the set. @throws NullPointerException if <tt>fromElement</tt> or <tt>toElement</tt> is null and this set does not permit null elements @throws IllegalArgumentException if <tt>fromElement</tt> is greater than <tt>toElement</tt>; or if this set itself has a restricted range, and <tt>fromElement</tt> or <tt>toElement</tt> lies outside the bounds of the range

interface SortedSet(E)
subSet

Meta