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>
AdaptsCollectiontoCloseableIteratorCollection- 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 booleanadd(E e)booleanaddAll(Collection<? extends E> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanisEmpty()CloseableIterator<E>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()CloseableSpliterator<E>spliterator()Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.commons.util.CloseableIteratorCollection
parallelStream, stream
-
Methods inherited from interface java.util.Collection
equals, hashCode, removeIf, toArray
-
-
-
-
Field Detail
-
delegate
protected final Collection<E> delegate
-
-
Constructor Detail
-
CloseableIteratorCollectionAdapter
public CloseableIteratorCollectionAdapter(Collection<E> delegate)
-
-
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>
-
iterator
public CloseableIterator<E> iterator()
Description copied from interface:CloseableIteratorCollectionThis 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:
iteratorin interfaceCloseableIteratorCollection<E>- Specified by:
iteratorin interfaceCollection<E>- Specified by:
iteratorin interfaceIterable<E>
-
spliterator
public CloseableSpliterator<E> spliterator()
Description copied from interface:CloseableIteratorCollectionThis spliterator should be explicitly closed after it has been used. Failure to do so could cause resources to not be freed properly
- Specified by:
spliteratorin interfaceCloseableIteratorCollection<E>- Specified by:
spliteratorin interfaceCollection<E>- Specified by:
spliteratorin interfaceIterable<E>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(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(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAllin interfaceCollection<E>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<E>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<E>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<E>
-
-