The returned set will throw an {@code IllegalArgumentException}on an attempt to insert an element outside its range. @param fromElement low endpoint of the returned set @param fromInclusive {@code true} if the low endpointis to be included in the returned view @param toElement high endpoint of the returned set @param toInclusive {@code true} if the high endpointis to be included in the returned view @return a view of the portion of this set whose elements range from{@code fromElement}, inclusive, to {@code toElement}, exclusive @throws ClassCastException if {@code fromElement} and{@code toElement} cannot be compared to one another using thisset's comparator (or, if the set has no comparator, using natural ordering). Implementations may, but are not required to, throw this exception if {@code fromElement} or{@code toElement} cannot be compared to elements currently inthe set. @throws NullPointerException if {@code fromElement} or{@code toElement} is null and this set doesnot permit null elements @throws IllegalArgumentException if {@code fromElement} isgreater than {@code toElement}; or if this set itself has a restricted range, and {@code fromElement} or{@code toElement} lies outside the bounds of the range.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|