Package org.infinispan.commons.util
Class RemovableCloseableIterator<C>
java.lang.Object
org.infinispan.commons.util.RemovableIterator<C>
org.infinispan.commons.util.RemovableCloseableIterator<C>
- All Implemented Interfaces:
AutoCloseable
,Iterator<C>
,CloseableIterator<C>
- Direct Known Subclasses:
RemovableCloseableIterator
public class RemovableCloseableIterator<C>
extends RemovableIterator<C>
implements CloseableIterator<C>
A CloseableIterator implementation that allows for a CloseableIterator that doesn't allow remove operations to
implement remove by delegating the call to the provided consumer to remove the previously read value.
- Since:
- 9.1
- Author:
- wburns
-
Field Summary
Fields inherited from class org.infinispan.commons.util.RemovableIterator
consumer, currentValue, previousValue
-
Constructor Summary
ConstructorDescriptionRemovableCloseableIterator
(CloseableIterator<C> realIterator, Consumer<? super C> consumer) -
Method Summary
Methods inherited from class org.infinispan.commons.util.RemovableIterator
getNextFromIterator, hasNext, next, remove
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Field Details
-
realIterator
-
-
Constructor Details
-
RemovableCloseableIterator
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseableIterator<C>
-