Package com.tangosol.util
Class ChainedSet<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractSet<E>
com.tangosol.util.ChainedSet<E>
- Type Parameters:
 E- the type of Set elements
- All Implemented Interfaces:
 Iterable<E>,Collection<E>,Set<E>
An unmodifiable Set that provides access to many sets in the
 given order.
 
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.
- Since:
 - Coherence 23.03
 - Author:
 - as 2023.03.03
 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionChainedSet(ChainedSet<E> original, Set<E> set) Construct a ChainedSet from the existing ChainedSet and an additional Set object.ChainedSet(ChainedSet<E> original, Set<E>... aSets) Construct a ChainedSet from the existing ChainedSet and an array of Set objects.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. - 
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.AbstractSet
equals, hashCodeMethods inherited from class java.util.AbstractCollection
toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, streamMethods inherited from interface java.util.Set
spliterator 
- 
Field Details
- 
f_aSets
An array of Sets to enumerate. 
 - 
 - 
Constructor Details
- 
ChainedSet
Construct a ChainedSet with the provided Collection of Set objects.- Parameters:
 col- a Collection of Set objects
 - 
ChainedSet
Construct a ChainedSet from the existing ChainedSet and an additional Set object.- Parameters:
 original- the original ChainedSetset- a Set object to append
 - 
ChainedSet
Construct a ChainedSet from the existing ChainedSet and an array of Set objects.- Parameters:
 original- the original ChainedSetaSets- an array of Set objects
 - 
ChainedSet
Construct a ChainedSet with the provided array of Set objects.- Parameters:
 aSets- an array of Set objects
 
 - 
 - 
Method Details
- 
size
public int size()- Specified by:
 sizein interfaceCollection<E>- Specified by:
 sizein interfaceSet<E>- Specified by:
 sizein classAbstractCollection<E>
 - 
isEmpty
public boolean isEmpty()- Specified by:
 isEmptyin interfaceCollection<E>- Specified by:
 isEmptyin interfaceSet<E>- Overrides:
 isEmptyin classAbstractCollection<E>
 - 
contains
- Specified by:
 containsin interfaceCollection<E>- Specified by:
 containsin interfaceSet<E>- Overrides:
 containsin classAbstractCollection<E>
 - 
containsAll
- Specified by:
 containsAllin interfaceCollection<E>- Specified by:
 containsAllin interfaceSet<E>- Overrides:
 containsAllin classAbstractCollection<E>
 - 
iterator
 - 
toArray
- Specified by:
 toArrayin interfaceCollection<E>- Specified by:
 toArrayin interfaceSet<E>- Overrides:
 toArrayin classAbstractCollection<E>
 - 
toArray
 - 
toArray
public <T> T[] toArray(T[] a) - Specified by:
 toArrayin interfaceCollection<E>- Specified by:
 toArrayin interfaceSet<E>- Overrides:
 toArrayin classAbstractCollection<E>
 - 
add
- Specified by:
 addin interfaceCollection<E>- Specified by:
 addin interfaceSet<E>- Overrides:
 addin classAbstractCollection<E>
 - 
addAll
- Specified by:
 addAllin interfaceCollection<E>- Specified by:
 addAllin interfaceSet<E>- Overrides:
 addAllin classAbstractCollection<E>
 - 
remove
- Specified by:
 removein interfaceCollection<E>- Specified by:
 removein interfaceSet<E>- Overrides:
 removein classAbstractCollection<E>
 - 
removeAll
- Specified by:
 removeAllin interfaceCollection<E>- Specified by:
 removeAllin interfaceSet<E>- Overrides:
 removeAllin classAbstractSet<E>
 - 
retainAll
- Specified by:
 retainAllin interfaceCollection<E>- Specified by:
 retainAllin interfaceSet<E>- Overrides:
 retainAllin classAbstractCollection<E>
 - 
clear
public void clear()- Specified by:
 clearin interfaceCollection<E>- Specified by:
 clearin interfaceSet<E>- Overrides:
 clearin classAbstractCollection<E>
 
 -