| bak.pcj.set.ShortSortedSet
All known Subclasses: bak.pcj.adapter.SortedSetToShortSortedSetAdapter, bak.pcj.set.ShortRangeSet, bak.pcj.set.ShortBitSet,
ShortSortedSet | public interface ShortSortedSet extends ShortSet(Code) | | This interface defines extends the ShortSet interface to define
sorted sets.
See Also: java.util.SortedSet author: Søren Bak version: 1.0 2002/12/04 since: 1.2 |
Method Summary | |
boolean | add(short v) Adds an element to this set.
Parameters: v - the element to add to this set. | short | first() Returns the lowest element of this set. | ShortSortedSet | headSet(short to) Returns the subset of values lower than a specified value. | short | last() Returns the highest element of this set. | ShortSortedSet | subSet(short from, short to) Returns the subset of values lower that a specified value and
higher than or equal to another specified value. | ShortSortedSet | tailSet(short from) Returns the subset of values higher than or equal to a
specified value. |
add | boolean add(short v)(Code) | | Adds an element to this set.
Parameters: v - the element to add to this set. true if this set was modifiedas a result of adding v; returnsfalse otherwise. throws: UnsupportedOperationException - if the operation is not supported by thisset. throws: IllegalArgumentException - if v is not permitted, because this setis a subset of another set. |
first | short first()(Code) | | Returns the lowest element of this set.
the lowest element of this set. throws: NoSuchElementException - if this set is empty. |
headSet | ShortSortedSet headSet(short to)(Code) | | Returns the subset of values lower than a specified value.
The returned subset is a view of this set, so changes to the
subset are reflected by this set and vice versa.
Parameters: to - the upper bound of the returned set (not included). throws: IllegalArgumentException - if to is not permittedin this set (which can be the case with returnedsubsets). |
last | short last()(Code) | | Returns the highest element of this set.
the highest element of this set. throws: NoSuchElementException - if this set is empty. |
subSet | ShortSortedSet subSet(short from, short to)(Code) | | Returns the subset of values lower that a specified value and
higher than or equal to another specified value.
The returned subset is a view of this set, so changes to the
subset are reflected by this set and vice versa.
Parameters: from - the lower bound of the returned set (included). Parameters: to - the upper bound of the returned set (not included). throws: IllegalArgumentException - if from is greater than to;if from or to is not permittedin this set (which can be the case with returnedsubsets). |
tailSet | ShortSortedSet tailSet(short from)(Code) | | Returns the subset of values higher than or equal to a
specified value.
The returned subset is a view of this set, so changes to the
subset are reflected by this set and vice versa.
Parameters: from - the lower bound of the returned set (included). throws: IllegalArgumentException - if from is not permittedin this set (which can be the case with returnedsubsets). |
|
|