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
Modifier and TypeFieldDescriptionprotected final Collection<E>[]
An array of Collections to enumerate. -
Constructor Summary
ConstructorDescriptionChainedCollection
(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 TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> c) void
clear()
boolean
boolean
containsAll
(Collection<?> col) boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
Object[]
toArray()
<T> T[]
toArray
(IntFunction<T[]> generator) <T> T[]
toArray
(T[] a) Methods inherited from class java.util.AbstractCollection
toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
size
in interfaceCollection<E>
- Specified by:
size
in classAbstractCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<E>
- Overrides:
isEmpty
in classAbstractCollection<E>
-
contains
- Specified by:
contains
in interfaceCollection<E>
- Overrides:
contains
in classAbstractCollection<E>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
- Overrides:
containsAll
in classAbstractCollection<E>
-
iterator
- Specified by:
iterator
in interfaceCollection<E>
- Specified by:
iterator
in interfaceIterable<E>
- Specified by:
iterator
in classAbstractCollection<E>
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
- Overrides:
toArray
in classAbstractCollection<E>
-
toArray
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<E>
- Overrides:
toArray
in classAbstractCollection<E>
-
add
- Specified by:
add
in interfaceCollection<E>
- Overrides:
add
in classAbstractCollection<E>
-
addAll
- Specified by:
addAll
in interfaceCollection<E>
- Overrides:
addAll
in classAbstractCollection<E>
-
remove
- Specified by:
remove
in interfaceCollection<E>
- Overrides:
remove
in classAbstractCollection<E>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<E>
- Overrides:
removeAll
in classAbstractCollection<E>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<E>
- Overrides:
retainAll
in classAbstractCollection<E>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
- Overrides:
clear
in classAbstractCollection<E>
-