- java.lang.Object
-
- org.arakhne.afc.util.MultiCollection<E>
-
- Type Parameters:
E- is the type of elements in the collections.
- All Implemented Interfaces:
Iterable<E>,Collection<E>
public class MultiCollection<E> extends Object implements Collection<E>
A collection composed of collections.This collection is not thread-safe.
This collection is read-only.
- Version:
- 17.0 2020-01-04 14:41:38
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- util
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMultiCollection.MultiIterator<E>Iterator on multicollection.
-
Constructor Summary
Constructors Constructor Description MultiCollection()Construct the collection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E value)This function is not supported, seeaddCollection(Collection).booleanaddAll(Collection<? extends E> collection)This function is not supported, seeaddCollection(Collection).voidaddCollection(Collection<? extends E> collection)Add a collection inside this multicollection.voidclear()booleancontains(Object obj)booleancontainsAll(Collection<?> collection)booleanisEmpty()Iterator<E>iterator()booleanremove(Object obj)This function is not supported, seeremoveCollection(Collection).booleanremoveAll(Collection<?> collection)This function is not supported, seeremoveCollection(Collection).booleanremoveCollection(Collection<? extends E> collection)Remove a collection from this multicollection.booleanretainAll(Collection<?> collection)This function is not supported, seeremoveCollection(Collection).intsize()Object[]toArray()<T> T[]toArray(T[] array)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Method Detail
-
addCollection
public void addCollection(Collection<? extends E> collection)
Add a collection inside this multicollection.- Parameters:
collection- the collection to add.
-
removeCollection
public boolean removeCollection(Collection<? extends E> collection)
Remove a collection from this multicollection.- Parameters:
collection- the collection to remove.- Returns:
trueif the multi-collection has changed, otherwisefalse.
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<E>
-
add
public boolean add(E value)
This function is not supported, seeaddCollection(Collection).- Specified by:
addin interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> collection)
This function is not supported, seeaddCollection(Collection).- Specified by:
addAllin interfaceCollection<E>
-
contains
@Pure public boolean contains(Object obj)
- Specified by:
containsin interfaceCollection<E>
-
containsAll
@Pure public boolean containsAll(Collection<?> collection)
- Specified by:
containsAllin interfaceCollection<E>
-
isEmpty
@Pure public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<E>
-
remove
public boolean remove(Object obj)
This function is not supported, seeremoveCollection(Collection).- Specified by:
removein interfaceCollection<E>
-
removeAll
public boolean removeAll(Collection<?> collection)
This function is not supported, seeremoveCollection(Collection).- Specified by:
removeAllin interfaceCollection<E>
-
retainAll
public boolean retainAll(Collection<?> collection)
This function is not supported, seeremoveCollection(Collection).- Specified by:
retainAllin interfaceCollection<E>
-
size
@Pure public int size()
- Specified by:
sizein interfaceCollection<E>
-
toArray
@Pure public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArrayin interfaceCollection<E>
-
-