Class CloseableIteratorIteration<E>
java.lang.Object
org.eclipse.rdf4j.common.iteration.CloseableIteratorIteration<E>
- All Implemented Interfaces:
AutoCloseable
,Iterator<E>
,CloseableIteration<E>
An Iteration that can convert an
Iterator
to a CloseableIteration
.-
Constructor Summary
ConstructorDescriptionCloseableIteratorIteration
(Iterator<? extends E> iter) Creates a CloseableIteratorIteration that wraps the supplied iterator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration
stream
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
CloseableIteratorIteration
Creates a CloseableIteratorIteration that wraps the supplied iterator.
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
handleClose
protected void handleClose() -
isClosed
public final boolean isClosed()Checks whether this CloseableIteration has been closed.- Returns:
- true if the CloseableIteration has been closed, false otherwise.
-
close
public final void close()CallshandleClose()
upon first call and makes sure the resource closures are only executed once.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseableIteration<E>
-