Package org.infinispan.commons.util
Class CloseableIteratorCollectionAdapter<E>
- java.lang.Object
-
- org.infinispan.commons.util.CloseableIteratorCollectionAdapter<E>
-
- All Implemented Interfaces:
java.lang.Iterable<E>,java.util.Collection<E>,CloseableIteratorCollection<E>
- Direct Known Subclasses:
CloseableIteratorSetAdapter
public class CloseableIteratorCollectionAdapter<E> extends java.lang.Object implements CloseableIteratorCollection<E>
AdaptsCollectiontoCloseableIteratorCollection- Author:
- Radim Vansa <rvansa@redhat.com>
-
-
Constructor Summary
Constructors Constructor Description CloseableIteratorCollectionAdapter(java.util.Collection<E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(java.util.Collection<? extends E> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleanisEmpty()CloseableIterator<E>iterator()booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()CloseableSpliterator<E>spliterator()java.lang.Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from interface org.infinispan.commons.util.CloseableIteratorCollection
parallelStream, stream
-
-
-
-
Field Detail
-
delegate
protected final java.util.Collection<E> delegate
-
-
Constructor Detail
-
CloseableIteratorCollectionAdapter
public CloseableIteratorCollectionAdapter(java.util.Collection<E> delegate)
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(java.lang.Object o)
-
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>
-
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>
-
toArray
public java.lang.Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(E e)
-
remove
public boolean remove(java.lang.Object o)
-
containsAll
public boolean containsAll(java.util.Collection<?> c)
-
addAll
public boolean addAll(java.util.Collection<? extends E> c)
-
retainAll
public boolean retainAll(java.util.Collection<?> c)
-
removeAll
public boolean removeAll(java.util.Collection<?> c)
-
clear
public void clear()
-
-