|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractSet bak.pcj.adapter.CharSetToSetAdapter bak.pcj.adapter.CharSortedSetToSortedSetAdapter
This class represents adapters of char sets to Java Collections Framework sets. The adapter is implemented as a wrapper around a primitive set. Thus, changes to the underlying set are reflected by this set and vice versa.
CharSortedSet
,
SortedSet
Field Summary |
Fields inherited from class bak.pcj.adapter.CharSetToSetAdapter |
set |
Constructor Summary | |
CharSortedSetToSortedSetAdapter(CharSortedSet set)
Creates a new adaption of a set of char values to a Java Collections Framework set. |
Method Summary | |
Comparator |
comparator()
Returns the comparator used by this set. |
Object |
first()
Returns the lowest element of this set. |
SortedSet |
headSet(Object to)
Returns the subset of values lower than a specified value. |
Object |
last()
Returns the highest element of this set. |
SortedSet |
subSet(Object from,
Object to)
Returns the subset of values lower that a specified value and higher than or equal to another specified value. |
SortedSet |
tailSet(Object from)
Returns the subset of values higher than or equal to a specified value. |
Methods inherited from class bak.pcj.adapter.CharSetToSetAdapter |
add, clear, contains, hashCode, iterator, remove, retainAll, size |
Methods inherited from class java.util.AbstractSet |
equals, removeAll |
Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, isEmpty, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Constructor Detail |
public CharSortedSetToSortedSetAdapter(CharSortedSet set)
set
- the underlying primitive set.
NullPointerException
- if set is null.Method Detail |
public Comparator comparator()
comparator
in interface SortedSet
public Object first()
first
in interface SortedSet
NoSuchElementException
- if this set is empty.public SortedSet headSet(Object to)
headSet
in interface SortedSet
to
- the upper bound of the returned set (not included).
IllegalArgumentException
- if to is not permitted
in this set (which can be the case with returned
subsets).
ClassCastException
- if to is not of class Character
.
NullPointerException
- if to is null.public Object last()
last
in interface SortedSet
NoSuchElementException
- if this set is empty.public SortedSet subSet(Object from, Object to)
subSet
in interface SortedSet
from
- the lower bound of the returned set (included).to
- the upper bound of the returned set (not included).
IllegalArgumentException
- if from is greater than to;
if from or to is not permitted
in this set (which can be the case with returned
subsets).
ClassCastException
- if from is not of class Character
;
if to is not of class Character
.
NullPointerException
- if from is null;
if to is null.public SortedSet tailSet(Object from)
tailSet
in interface SortedSet
from
- the lower bound of the returned set (included).
IllegalArgumentException
- if from is not permitted
in this set (which can be the case with returned
subsets).
ClassCastException
- if from is not of class Character
.
NullPointerException
- if from is null.
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |