- 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 class
MultiCollection.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 boolean
add(E value)
This function is not supported, seeaddCollection(Collection)
.boolean
addAll(Collection<? extends E> collection)
This function is not supported, seeaddCollection(Collection)
.void
addCollection(Collection<? extends E> collection)
Add a collection inside this multicollection.void
clear()
boolean
contains(Object obj)
boolean
containsAll(Collection<?> collection)
boolean
isEmpty()
Iterator<E>
iterator()
boolean
remove(Object obj)
This function is not supported, seeremoveCollection(Collection)
.boolean
removeAll(Collection<?> collection)
This function is not supported, seeremoveCollection(Collection)
.boolean
removeCollection(Collection<? extends E> collection)
Remove a collection from this multicollection.boolean
retainAll(Collection<?> collection)
This function is not supported, seeremoveCollection(Collection)
.int
size()
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:
true
if the multi-collection has changed, otherwisefalse
.
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<E>
-
add
public boolean add(E value)
This function is not supported, seeaddCollection(Collection)
.- Specified by:
add
in interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> collection)
This function is not supported, seeaddCollection(Collection)
.- Specified by:
addAll
in interfaceCollection<E>
-
contains
@Pure public boolean contains(Object obj)
- Specified by:
contains
in interfaceCollection<E>
-
containsAll
@Pure public boolean containsAll(Collection<?> collection)
- Specified by:
containsAll
in interfaceCollection<E>
-
isEmpty
@Pure public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<E>
-
remove
public boolean remove(Object obj)
This function is not supported, seeremoveCollection(Collection)
.- Specified by:
remove
in interfaceCollection<E>
-
removeAll
public boolean removeAll(Collection<?> collection)
This function is not supported, seeremoveCollection(Collection)
.- Specified by:
removeAll
in interfaceCollection<E>
-
retainAll
public boolean retainAll(Collection<?> collection)
This function is not supported, seeremoveCollection(Collection)
.- Specified by:
retainAll
in interfaceCollection<E>
-
size
@Pure public int size()
- Specified by:
size
in interfaceCollection<E>
-
toArray
@Pure public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] array)
- Specified by:
toArray
in interfaceCollection<E>
-
-