public class ChainedCollection<E> extends Object implements Collection<E>
Modifier and Type | Field | Description |
---|---|---|
protected Collection<E>[] |
f_acol |
An array of Collections to enumerate.
|
Constructor | Description |
---|---|
ChainedCollection(Collection<Collection<E>> col) |
Construct a ChainedCollection with the provided Collection of Collection
objects.
|
ChainedCollection(Collection<E>... acol) |
Construct a ChainedCollection with the provided array of Collection
objects.
|
Modifier and Type | Method | 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, parallelStream, removeIf, spliterator, stream
protected final Collection<E>[] f_acol
public ChainedCollection(Collection<Collection<E>> col)
col
- a Collection of Collection objectspublic ChainedCollection(Collection<E>... acol)
acol
- an array of Collection objectspublic int size()
size
in interface Collection<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
public boolean contains(Object o)
contains
in interface Collection<E>
public boolean containsAll(Collection<?> col)
containsAll
in interface Collection<E>
public Object[] toArray()
toArray
in interface Collection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
public boolean add(E e)
add
in interface Collection<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
public boolean remove(Object o)
remove
in interface Collection<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
public void clear()
clear
in interface Collection<E>