Package org.apache.ignite.internal.util
Class GridMultiCollectionWrapper<E>
- java.lang.Object
-
- org.apache.ignite.internal.util.GridMultiCollectionWrapper<E>
-
- Type Parameters:
E-
- All Implemented Interfaces:
Iterable<E>,Collection<E>
public class GridMultiCollectionWrapper<E> extends Object implements Collection<E>
Wrapper around several collection, don't allow adding new elements.
-
-
Field Summary
Fields Modifier and Type Field Description Collection<E>[]collectionsCollections.
-
Constructor Summary
Constructors Constructor Description GridMultiCollectionWrapper(Collection<E>... collections)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(Collection<? extends E> c)voidclear()intcollectionsSize()booleancontains(Object o)booleancontainsAll(@NotNull Collection<?> c)Collection<E>innerCollection(int idx)booleanisEmpty()@NotNull Iterator<E>iterator()booleanremove(Object o)booleanremoveAll(@NotNull Collection<?> c)booleanretainAll(@NotNull Collection<?> c)intsize()@NotNull Object[]toArray()<T> @NotNull T[]toArray(@NotNull T[] a)-
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
-
-
-
-
Field Detail
-
collections
public final Collection<E>[] collections
Collections.
-
-
Constructor Detail
-
GridMultiCollectionWrapper
public GridMultiCollectionWrapper(Collection<E>... collections)
- Parameters:
collections- Collections.
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceCollection<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<E>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<E>
-
toArray
@NotNull public @NotNull Object[] toArray()
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
@NotNull public <T> @NotNull T[] toArray(@NotNull @NotNull T[] a)- Specified by:
toArrayin interfaceCollection<E>
-
add
public boolean add(E e)
- Specified by:
addin interfaceCollection<E>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<E>
-
containsAll
public boolean containsAll(@NotNull @NotNull Collection<?> c)- Specified by:
containsAllin interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAllin interfaceCollection<E>
-
removeAll
public boolean removeAll(@NotNull @NotNull Collection<?> c)- Specified by:
removeAllin interfaceCollection<E>
-
retainAll
public boolean retainAll(@NotNull @NotNull Collection<?> c)- Specified by:
retainAllin interfaceCollection<E>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<E>
-
collectionsSize
public int collectionsSize()
- Returns:
- Number of inner collections.
-
innerCollection
public Collection<E> innerCollection(int idx)
- Parameters:
idx- Inner collection index.- Returns:
- Collection.
-
-