|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractSet<E>
java.util.TreeSet<E>
fi.joensuu.cs.tra.Set<E>
public class Set<E>
fi.joensuu.cs.tra.Set extends java.util.TreeSet with comparison methods.
TreeSet,
TreeMap,
Serialized Form| Constructor Summary | |
|---|---|
Set()
Constructs a new, empty set, sorted according to the elements' natural order. |
|
Set(java.util.Collection<? extends E> c)
Constructs a new set containing the elements in the specified collection, sorted according to the elements' natural order. |
|
Set(java.util.Comparator<? super E> c)
Constructs a new, empty set, sorted according to the specified comparator. |
|
Set(java.util.SortedSet<E> s)
Constructs a new set containing the same elements as the specified sorted set, sorted according to the same ordering. |
|
| Method Summary | |
|---|---|
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)
|
Set<E> |
difference(java.util.Collection<? extends E> c)
Returns the difference of this Set and the specified Collection. |
boolean |
equals(java.util.Collection<? extends E> c)
Checks if this Set and the specified Collection contain
the same elements. |
E |
first()
|
java.util.SortedSet<E> |
headSet(E toElement)
|
Set<E> |
intersection(java.util.Collection<? extends E> c)
Returns the intersection of this Set 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)
|
Set<E> |
union(java.util.Collection<? extends E> c)
Returns the union of this Set and the specified Collection. |
| Methods inherited from class java.util.AbstractSet |
|---|
equals, hashCode, removeAll |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, retainAll, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
| Constructor Detail |
|---|
public Set()
public Set(java.util.Collection<? extends E> c)
public Set(java.util.Comparator<? super E> c)
public Set(java.util.SortedSet<E> s)
| Method Detail |
|---|
public boolean add(E o)
add in interface java.util.Collection<E>add in interface java.util.Set<E>add in class java.util.TreeSet<E>public boolean addAll(java.util.Collection<? extends E> c)
addAll in interface java.util.Collection<E>addAll in interface java.util.Set<E>addAll in class java.util.TreeSet<E>public void clear()
clear in interface java.util.Collection<E>clear in interface java.util.Set<E>clear in class java.util.TreeSet<E>public java.lang.Object clone()
clone in class java.util.TreeSet<E>public java.util.Comparator<? super E> comparator()
comparator in interface java.util.SortedSet<E>comparator in class java.util.TreeSet<E>public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<E>contains in interface java.util.Set<E>contains in class java.util.TreeSet<E>public E first()
first in interface java.util.SortedSet<E>first in class java.util.TreeSet<E>public java.util.SortedSet<E> headSet(E toElement)
headSet in interface java.util.SortedSet<E>headSet in class java.util.TreeSet<E>public boolean isEmpty()
isEmpty in interface java.util.Collection<E>isEmpty in interface java.util.Set<E>isEmpty in class java.util.TreeSet<E>public java.util.Iterator<E> iterator()
iterator in interface java.lang.Iterable<E>iterator in interface java.util.Collection<E>iterator in interface java.util.Set<E>iterator in class java.util.TreeSet<E>public E last()
last in interface java.util.SortedSet<E>last in class java.util.TreeSet<E>public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<E>remove in interface java.util.Set<E>remove in class java.util.TreeSet<E>public int size()
size in interface java.util.Collection<E>size in interface java.util.Set<E>size in class java.util.TreeSet<E>
public java.util.SortedSet<E> subSet(E fromElement,
E toElement)
subSet in interface java.util.SortedSet<E>subSet in class java.util.TreeSet<E>public java.util.SortedSet<E> tailSet(E fromElement)
tailSet in interface java.util.SortedSet<E>tailSet in class java.util.TreeSet<E>public Set<E> union(java.util.Collection<? extends E> c)
Collection.
c - the Collection to combine this Set with.
Collection.public Set<E> intersection(java.util.Collection<? extends E> c)
Collection.
c - the Collection to intersect this Set with.
Collection.public Set<E> difference(java.util.Collection<? extends E> c)
Collection.
c - the Collection to subtract from this Set.
Collection.public boolean equals(java.util.Collection<? extends E> c)
Collection contain
the same elements.
c - the Collection to compare this Set with.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||