Package com.tangosol.util
Class ChainedCollection<E>
java.lang.Object
java.util.AbstractCollection<E>
com.tangosol.util.ChainedCollection<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>
An unmodifiable Collection that provides access to many collections in the
given order.
- Since:
- Coherence 12.1.2
- Author:
- hr 2014.02.19
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Collection<E>[]An array of Collections to enumerate. -
Constructor Summary
ConstructorsConstructorDescriptionChainedCollection(ChainedCollection<E> original, Collection<E> col) Construct a ChainedCollection from the existing ChainedCollection and an additional Collection object.ChainedCollection(ChainedCollection<E> original, Collection<E>... aCol) Construct a ChainedCollection from the existing ChainedCollection and an array of Collection objects.ChainedCollection(Collection<E>[] aCol) Construct a ChainedCollection with the provided array of Collection objects.ChainedCollection(Collection<Collection<E>> col) Construct a ChainedCollection with the provided Collection of Collection objects. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> col) booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(IntFunction<T[]> generator) <T> T[]toArray(T[] a) Methods inherited from class java.util.AbstractCollection
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream
-
Field Details
-
f_aCol
An array of Collections to enumerate.
-
-
Constructor Details
-
ChainedCollection
Construct a ChainedCollection with the provided Collection of Collection objects.- Parameters:
col- a Collection of Collection objects
-
ChainedCollection
Construct a ChainedCollection from the existing ChainedCollection and an additional Collection object.- Parameters:
original- the original ChainedCollectioncol- a Collection object to append
-
ChainedCollection
Construct a ChainedCollection from the existing ChainedCollection and an array of Collection objects.- Parameters:
original- the original ChainedSetaCol- an array of Collection objects
-
ChainedCollection
Construct a ChainedCollection with the provided array of Collection objects.- Parameters:
aCol- an array of Collection objects
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<E>- Specified by:
sizein classAbstractCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>- Overrides:
isEmptyin classAbstractCollection<E>
-
contains
- Specified by:
containsin interfaceCollection<E>- Overrides:
containsin classAbstractCollection<E>
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Overrides:
containsAllin classAbstractCollection<E>
-
iterator
- Specified by:
iteratorin interfaceCollection<E>- Specified by:
iteratorin interfaceIterable<E>- Specified by:
iteratorin classAbstractCollection<E>
-
toArray
- Specified by:
toArrayin interfaceCollection<E>- Overrides:
toArrayin classAbstractCollection<E>
-
toArray
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<E>- Overrides:
toArrayin classAbstractCollection<E>
-
add
- Specified by:
addin interfaceCollection<E>- Overrides:
addin classAbstractCollection<E>
-
addAll
- Specified by:
addAllin interfaceCollection<E>- Overrides:
addAllin classAbstractCollection<E>
-
remove
- Specified by:
removein interfaceCollection<E>- Overrides:
removein classAbstractCollection<E>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>- Overrides:
removeAllin classAbstractCollection<E>
-
retainAll
- Specified by:
retainAllin interfaceCollection<E>- Overrides:
retainAllin classAbstractCollection<E>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>- Overrides:
clearin classAbstractCollection<E>
-