public class TraSet<E>
extends java.util.TreeSet<E>
TreeSet
,
TreeMap
,
Serialized FormConstructor and Description |
---|
TraSet()
Constructs a new, empty set, sorted according to the elements'
natural order.
|
TraSet(java.util.Collection<? extends E> c)
Constructs a new set containing the elements in the specified collection,
sorted according to the elements'
natural order.
|
TraSet(java.util.Comparator<? super E> c)
Constructs a new, empty set, sorted according to the specified
comparator.
|
TraSet(java.util.SortedSet<E> s)
Constructs a new set containing the same elements as the specified sorted
set, sorted according to the same ordering.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E o) |
boolean |
addAll(java.util.Collection<? extends E> c) |
void |
clear() |
java.lang.Object |
clone() |
java.util.Comparator<? super E> |
comparator() |
boolean |
contains(java.lang.Object o) |
TraSet<E> |
difference(java.util.Collection<? extends E> c)
Returns the difference of this TraSet and the specified
Collection . |
boolean |
equals(java.util.Collection<? extends E> c)
Checks if this TraSet and the specified
Collection contain
the same elements. |
E |
first() |
java.util.SortedSet<E> |
headSet(E toElement) |
TraSet<E> |
intersection(java.util.Collection<? extends E> c)
Returns the intersection of this TraSet and the specified
Collection . |
boolean |
isEmpty() |
java.util.Iterator<E> |
iterator() |
E |
last() |
boolean |
remove(java.lang.Object o) |
int |
size() |
java.util.SortedSet<E> |
subSet(E fromElement,
E toElement) |
java.util.SortedSet<E> |
tailSet(E fromElement) |
TraSet<E> |
union(java.util.Collection<? extends E> c)
Returns the union of this TraSet and the specified
Collection . |
ceiling, descendingIterator, descendingSet, floor, headSet, higher, lower, pollFirst, pollLast, spliterator, subSet, tailSet
containsAll, retainAll, toArray, toArray, toString
public TraSet()
public TraSet(java.util.Collection<? extends E> c)
public TraSet(java.util.Comparator<? super E> c)
public TraSet(java.util.SortedSet<E> s)
public boolean add(E o)
public boolean addAll(java.util.Collection<? extends E> c)
public void clear()
public java.lang.Object clone()
clone
in class java.util.TreeSet<E>
public java.util.Comparator<? super E> comparator()
public boolean contains(java.lang.Object o)
public E first()
public boolean isEmpty()
public java.util.Iterator<E> iterator()
public E last()
public boolean remove(java.lang.Object o)
public int size()
public TraSet<E> union(java.util.Collection<? extends E> c)
Collection
.c
- the Collection
to combine this TraSet with.Collection
.public TraSet<E> intersection(java.util.Collection<? extends E> c)
Collection
.c
- the Collection
to intersect this TraSet with.Collection
.public TraSet<E> difference(java.util.Collection<? extends E> c)
Collection
.c
- the Collection
to subtract from this TraSet.Collection
.public boolean equals(java.util.Collection<? extends E> c)
Collection
contain
the same elements.c
- the Collection
to compare this TraSet with.