public class SortedSetImpl extends java.lang.Object implements SortedSet
SortedSet,
TreeSet| Constructor and Description |
|---|
SortedSetImpl()
Default Constructor, creates an empty Set,
according to the elements' natural order.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object o)
Adds an element.
|
java.lang.Object |
first()
Returns the first (lowest) element currently in this sorted set.
|
boolean |
isEmpty()
Checks if the collection contains elements.
|
Iterator |
iterator()
Returns an iterator over the elements in this collection.
|
boolean |
remove(java.lang.Object o)
Removes one instance of the specified element.
|
int |
size()
Returns the number of elements in this collection.
|
java.lang.Object[] |
toArray()
Returns an array containing all of the elements in this collection.
|
public SortedSetImpl()
public boolean add(java.lang.Object o)
Collectionadd in interface Collectioninterfacepublic boolean isEmpty()
CollectionisEmpty in interface Collectioninterfacepublic boolean remove(java.lang.Object o)
Collectionremove in interface Collectiono - the element to be removedinterfacepublic Iterator iterator()
Collectioniterator in interface Collectioninterfacepublic java.lang.Object[] toArray()
CollectiontoArray in interface Collectioninterfacepublic int size()
Collectionsize in interface Collectioninterface