Class DelayedEvaluationIteration
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<BindingSet,QueryEvaluationException>
org.eclipse.rdf4j.query.algebra.evaluation.iterator.DelayedEvaluationIteration
- All Implemented Interfaces:
AutoCloseable
,CloseableIteration<BindingSet,
,QueryEvaluationException> Iteration<BindingSet,
QueryEvaluationException>
public class DelayedEvaluationIteration
extends AbstractCloseableIteration<BindingSet,QueryEvaluationException>
Utility class that removes code duplication and makes a precompiled QueryEvaluationStep available as an iteration
that may be created and used later.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected CloseableIteration<BindingSet,
QueryEvaluationException> protected final void
Closes this iteration as well as the underlying iteration if it has already been created and happens to be aCloseableIteration
.boolean
hasNext()
Calls the hasNext method of the underlying iteration.next()
Calls the next method of the underlying iteration.void
remove()
Calls the remove method of the underlying iteration.Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration
close, isClosed
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
-
Constructor Details
-
DelayedEvaluationIteration
-
-
Method Details
-
createIteration
protected CloseableIteration<BindingSet,QueryEvaluationException> createIteration() throws QueryEvaluationException- Throws:
QueryEvaluationException
-
hasNext
Calls the hasNext method of the underlying iteration.- Returns:
- true if the iteration has more elements.
- Throws:
QueryEvaluationException
-
next
Calls the next method of the underlying iteration.- Returns:
- the next element in the iteration.
- Throws:
QueryEvaluationException
-
remove
Calls the remove method of the underlying iteration.- Throws:
QueryEvaluationException
-
handleClose
Closes this iteration as well as the underlying iteration if it has already been created and happens to be aCloseableIteration
.- Overrides:
handleClose
in classAbstractCloseableIteration<BindingSet,
QueryEvaluationException> - Throws:
QueryEvaluationException
-