public class ChainedCollection<E> extends AbstractCollection<E>
Modifier and Type | Field and Description |
---|---|
protected Collection<E>[] |
f_aCol
An array of Collections to enumerate.
|
Constructor and Description |
---|
ChainedCollection(ChainedCollection<E> original,
Collection<E>... aCol)
Construct a ChainedCollection from the existing ChainedCollection and
an array of Collection objects.
|
ChainedCollection(ChainedCollection<E> original,
Collection<E> col)
Construct a ChainedCollection from the existing ChainedCollection and
an additional Collection object.
|
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 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) |
toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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(ChainedCollection<E> original, Collection<E> col)
original
- the original ChainedCollectioncol
- a Collection object to append@SafeVarargs public ChainedCollection(ChainedCollection<E> original, Collection<E>... aCol)
original
- the original ChainedSetaCol
- an array of Collection objects@SafeVarargs public ChainedCollection(Collection<E>... aCol)
aCol
- an array of Collection objectspublic int size()
size
in interface Collection<E>
size
in class AbstractCollection<E>
public boolean isEmpty()
isEmpty
in interface Collection<E>
isEmpty
in class AbstractCollection<E>
public boolean contains(Object o)
contains
in interface Collection<E>
contains
in class AbstractCollection<E>
public boolean containsAll(Collection<?> col)
containsAll
in interface Collection<E>
containsAll
in class AbstractCollection<E>
public Iterator<E> iterator()
iterator
in interface Iterable<E>
iterator
in interface Collection<E>
iterator
in class AbstractCollection<E>
public Object[] toArray()
toArray
in interface Collection<E>
toArray
in class AbstractCollection<E>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
toArray
in class AbstractCollection<E>
public boolean add(E e)
add
in interface Collection<E>
add
in class AbstractCollection<E>
public boolean addAll(Collection<? extends E> c)
addAll
in interface Collection<E>
addAll
in class AbstractCollection<E>
public boolean remove(Object o)
remove
in interface Collection<E>
remove
in class AbstractCollection<E>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
removeAll
in class AbstractCollection<E>
public boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
retainAll
in class AbstractCollection<E>
public void clear()
clear
in interface Collection<E>
clear
in class AbstractCollection<E>