Package org.infinispan.commons.util
Class CloseableIteratorCollectionAdapter<E>
- java.lang.Object
-
- org.infinispan.commons.util.CloseableIteratorCollectionAdapter<E>
-
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,CloseableIteratorCollection<E>
- Direct Known Subclasses:
CloseableIteratorSetAdapter
public class CloseableIteratorCollectionAdapter<E> extends Object implements CloseableIteratorCollection<E>
AdaptsCollection
toCloseableIteratorCollection
- Author:
- Radim Vansa <rvansa@redhat.com>
-
-
Field Summary
Fields Modifier and Type Field Description protected Collection<E>
delegate
-
Constructor Summary
Constructors Constructor Description CloseableIteratorCollectionAdapter(Collection<E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(E e)
boolean
addAll(Collection<? extends E> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
boolean
isEmpty()
CloseableIterator<E>
iterator()
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
retainAll(Collection<?> c)
int
size()
CloseableSpliterator<E>
spliterator()
Object[]
toArray()
<T> T[]
toArray(T[] a)
-
Methods inherited from interface org.infinispan.commons.util.CloseableIteratorCollection
parallelStream, stream
-
-
-
-
Field Detail
-
delegate
protected final Collection<E> delegate
-
-
Constructor Detail
-
CloseableIteratorCollectionAdapter
public CloseableIteratorCollectionAdapter(Collection<E> delegate)
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
iterator
public CloseableIterator<E> iterator()
Description copied from interface:CloseableIteratorCollection
This iterator should be explicitly closed when iteration upon it is completed. Failure to do so could cause resources to not be freed properly
- Specified by:
iterator
in interfaceCloseableIteratorCollection<E>
-
spliterator
public CloseableSpliterator<E> spliterator()
Description copied from interface:CloseableIteratorCollection
This spliterator should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
- Specified by:
spliterator
in interfaceCloseableIteratorCollection<E>
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(E e)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
-
addAll
public boolean addAll(Collection<? extends E> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
clear
public void clear()
-
-