|
||||||||
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 FormConstructor Summary | |
---|---|
Set()
Constructs a new, empty set, sorted according to the elements' natural order. |
|
Set(Collection<? extends E> c)
Constructs a new set containing the elements in the specified collection, sorted according to the elements' natural order. |
|
Set(Comparator<? super E> c)
Constructs a new, empty set, sorted according to the specified comparator. |
|
Set(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(Collection<? extends E> c)
|
void |
clear()
|
Object |
clone()
|
Comparator<? super E> |
comparator()
|
boolean |
contains(Object o)
|
Set<E> |
difference(Collection<? extends E> c)
Returns the difference of this Set and the specified Collection . |
boolean |
equals(Collection<? extends E> c)
Checks if this Set and the specified Collection contain
the same elements. |
E |
first()
|
SortedSet<E> |
headSet(E toElement)
|
Set<E> |
intersection(Collection<? extends E> c)
Returns the intersection of this Set and the specified Collection . |
boolean |
isEmpty()
|
Iterator<E> |
iterator()
|
E |
last()
|
boolean |
remove(Object o)
|
int |
size()
|
SortedSet<E> |
subSet(E fromElement,
E toElement)
|
SortedSet<E> |
tailSet(E fromElement)
|
Set<E> |
union(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(Collection<? extends E> c)
public Set(Comparator<? super E> c)
public Set(SortedSet<E> s)
Method Detail |
---|
public boolean add(E o)
add
in interface Collection<E>
add
in interface Set<E>
add
in class TreeSet<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in interface Set<E>
addAll
in class TreeSet<E>
public void clear()
clear
in interface Collection<E>
clear
in interface Set<E>
clear
in class TreeSet<E>
public Object clone()
clone
in class TreeSet<E>
public Comparator<? super E> comparator()
comparator
in interface SortedSet<E>
comparator
in class TreeSet<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in interface Set<E>
contains
in class TreeSet<E>
public E first()
first
in interface SortedSet<E>
first
in class TreeSet<E>
public SortedSet<E> headSet(E toElement)
headSet
in interface SortedSet<E>
headSet
in class TreeSet<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in interface Set<E>
isEmpty
in class TreeSet<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in interface Set<E>
iterator
in class TreeSet<E>
public E last()
last
in interface SortedSet<E>
last
in class TreeSet<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in interface Set<E>
remove
in class TreeSet<E>
public int size()
size
in interface Collection<E>
size
in interface Set<E>
size
in class TreeSet<E>
public SortedSet<E> subSet(E fromElement, E toElement)
subSet
in interface SortedSet<E>
subSet
in class TreeSet<E>
public SortedSet<E> tailSet(E fromElement)
tailSet
in interface SortedSet<E>
tailSet
in class TreeSet<E>
public Set<E> union(Collection<? extends E> c)
Collection
.
c
- the Collection
to combine this Set with.
Collection
.public Set<E> intersection(Collection<? extends E> c)
Collection
.
c
- the Collection
to intersect this Set with.
Collection
.public Set<E> difference(Collection<? extends E> c)
Collection
.
c
- the Collection
to subtract from this Set.
Collection
.public boolean equals(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 |