|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractCollection
AbstractSet
ImmutableSet
SingletonSortedSet
A singleton SortedSet, meaning a SortedSet
with exactly one element. The set is immutable.
| Constructor Summary | |
SingletonSortedSet(Object element)
Constructor. |
|
| Method Summary | |
Comparator |
comparator()
Returns a dummy comparator in which the unique element of this set is always equal to itself. |
boolean |
contains(Object o)
|
Object |
first()
|
int |
hashCode()
|
SortedSet |
headSet(Object to)
Returns an empty SortedSet. |
boolean |
isEmpty()
|
Iterator |
iterator()
|
Object |
last()
|
int |
size()
|
SortedSet |
subSet(Object from,
Object to)
Returns an empty SortedSet. |
SortedSet |
tailSet(Object from)
Returns this if from is the unique
element of this set, and an empty SortedSet
otherwise. |
| Methods inherited from class ImmutableSet |
add, addAll, clear, remove, removeAll, retainAll |
| Methods inherited from class AbstractSet |
equals |
| Methods inherited from class AbstractCollection |
containsAll, toArray, toArray, toString |
| Methods inherited from class Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface Set |
add, addAll, clear, containsAll, equals, remove, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
public SingletonSortedSet(Object element)
element - The unique element of this sorted set.
NullPointerException - If element is
null.| Method Detail |
public final boolean contains(Object o)
contains in interface Setpublic final int hashCode()
hashCode in interface Setpublic final boolean isEmpty()
isEmpty in interface Setpublic Iterator iterator()
iterator in interface Setpublic final int size()
size in interface Setpublic final Object first()
first in interface SortedSetpublic final Object last()
last in interface SortedSetpublic final Comparator comparator()
comparator in interface SortedSet
public SortedSet subSet(Object from,
Object to)
SortedSet.
subSet in interface SortedSetpublic SortedSet headSet(Object to)
SortedSet.
headSet in interface SortedSetpublic SortedSet tailSet(Object from)
this if from is the unique
element of this set, and an empty SortedSet
otherwise.
tailSet in interface SortedSet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||