public class DisjointSetUnion<E> extends AbstractSet<E>
Set contract only of the outer code guarantees that the sets are
indeed disjoint and does not attempt to add elements which already exist in
the union.| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E theElement) |
void |
clear() |
boolean |
contains(Object theObject) |
static <E> DisjointSetUnion<E> |
from(Iterable<? extends E> theElements) |
Iterator<E> |
iterator() |
static <E> DisjointSetUnion<E> |
merge(DisjointSetUnion<E> theFirst,
DisjointSetUnion<E> theSecond) |
boolean |
remove(Object theObject) |
int |
size() |
static <E> DisjointSetUnion<E> |
union(Iterable<Set<E>> theSets) |
equals, hashCode, removeAlladdAll, containsAll, isEmpty, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, isEmpty, retainAll, spliterator, toArray, toArrayparallelStream, removeIf, streampublic static <E> DisjointSetUnion<E> from(Iterable<? extends E> theElements)
public static <E> DisjointSetUnion<E> union(Iterable<Set<E>> theSets)
public static <E> DisjointSetUnion<E> merge(DisjointSetUnion<E> theFirst, DisjointSetUnion<E> theSecond)
public int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public boolean contains(Object theObject)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean add(E theElement)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean remove(Object theObject)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>Copyright © 2010-2016 Stardog Union. All Rights Reserved.