Class ForwardingCloseableIterator<T>
java.lang.Object
org.springframework.data.keyvalue.core.ForwardingCloseableIterator<T>
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterator<T>,org.springframework.data.util.CloseableIterator<T>
public class ForwardingCloseableIterator<T>
extends Object
implements org.springframework.data.util.CloseableIterator<T>
Forwards
CloseableIterator invocations to the configured Iterator delegate.- Author:
- Christoph Strobl, Thomas Darimont, Oliver Gierke, Mark Paluch
-
Constructor Summary
ConstructorsConstructorDescriptionForwardingCloseableIterator(Iterator<? extends T> delegate) Creates a newForwardingCloseableIterator.ForwardingCloseableIterator(Iterator<? extends T> delegate, Runnable closeHandler) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.data.util.CloseableIterator
spliterator, streamMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
ForwardingCloseableIterator
Creates a newForwardingCloseableIterator.- Parameters:
delegate- must not be null.
-
ForwardingCloseableIterator
- Parameters:
delegate- must not be null.closeHandler- may be null.
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.springframework.data.util.CloseableIterator<T>
-