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>
Adapts
Collection
to CloseableIteratorCollection
- Author:
- Radim Vansa <rvansa@redhat.com>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
retainAll
(Collection<?> c) int
size()
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 Details
-
delegate
-
-
Constructor Details
-
CloseableIteratorCollectionAdapter
-
-
Method Details
-
size
public int size()- Specified by:
size
in interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<E>
-
contains
- Specified by:
contains
in interfaceCollection<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>
- Specified by:
iterator
in interfaceCollection<E>
- Specified by:
iterator
in interfaceIterable<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>
- Specified by:
spliterator
in interfaceCollection<E>
- Specified by:
spliterator
in interfaceIterable<E>
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<E>
-
add
- Specified by:
add
in interfaceCollection<E>
-
remove
- Specified by:
remove
in interfaceCollection<E>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
-
addAll
- Specified by:
addAll
in interfaceCollection<E>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<E>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<E>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
-