E - the type of Set elementspublic class ChainedSet<E> extends AbstractSet<E>
Note that this implementation does not ensure that the elements are unique across all chained sets. It is up to the user to provide that guarantee.
| Modifier and Type | Field and Description |
|---|---|
protected Set<E>[] |
f_aSets
An array of Sets to enumerate.
|
| Constructor and Description |
|---|
ChainedSet(ChainedSet<E> original,
Set<E>... aSets)
Construct a ChainedSet from the existing ChainedSet and an array of Set
objects.
|
ChainedSet(ChainedSet<E> original,
Set<E> set)
Construct a ChainedSet from the existing ChainedSet and an additional Set
object.
|
ChainedSet(Collection<Set<E>> col)
Construct a ChainedSet with the provided Collection of Set
objects.
|
ChainedSet(Set<E>... aSets)
Construct a ChainedSet with the provided array of Set
objects.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e) |
boolean |
addAll(Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> col) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
equals, hashCodetoStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitspliteratorparallelStream, removeIf, streampublic ChainedSet(Collection<Set<E>> col)
col - a Collection of Set objectspublic ChainedSet(ChainedSet<E> original, Set<E> set)
original - the original ChainedSetset - a Set object to appendpublic ChainedSet(ChainedSet<E> original, Set<E>... aSets)
original - the original ChainedSetaSets - an array of Set objectspublic int size()
size in interface Collection<E>size in interface Set<E>size in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface Set<E>isEmpty in class AbstractCollection<E>public boolean contains(Object o)
contains in interface Collection<E>contains in interface Set<E>contains in class AbstractCollection<E>public boolean containsAll(Collection<?> col)
containsAll in interface Collection<E>containsAll in interface Set<E>containsAll in class AbstractCollection<E>public Object[] toArray()
toArray in interface Collection<E>toArray in interface Set<E>toArray in class AbstractCollection<E>public <T> T[] toArray(T[] a)
toArray in interface Collection<E>toArray in interface Set<E>toArray in class AbstractCollection<E>public boolean add(E e)
add in interface Collection<E>add in interface Set<E>add in class AbstractCollection<E>public boolean addAll(Collection<? extends E> c)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class AbstractCollection<E>public boolean remove(Object o)
remove in interface Collection<E>remove in interface Set<E>remove in class AbstractCollection<E>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<E>removeAll in interface Set<E>removeAll in class AbstractSet<E>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<E>retainAll in interface Set<E>retainAll in class AbstractCollection<E>public void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class AbstractCollection<E>