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
Constructors Constructor Description DelayedEvaluationIteration(QueryEvaluationStep arg, BindingSet bs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CloseableIteration<BindingSet,QueryEvaluationException>
createIteration()
protected void
handleClose()
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.BindingSet
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 Detail
-
DelayedEvaluationIteration
public DelayedEvaluationIteration(QueryEvaluationStep arg, BindingSet bs)
-
-
Method Detail
-
createIteration
protected CloseableIteration<BindingSet,QueryEvaluationException> createIteration() throws QueryEvaluationException
- Throws:
QueryEvaluationException
-
hasNext
public boolean hasNext() throws QueryEvaluationException
Calls the hasNext method of the underlying iteration.- Returns:
- true if the iteration has more elements.
- Throws:
QueryEvaluationException
-
next
public BindingSet next() throws QueryEvaluationException
Calls the next method of the underlying iteration.- Returns:
- the next element in the iteration.
- Throws:
QueryEvaluationException
-
remove
public void remove() throws QueryEvaluationException
Calls the remove method of the underlying iteration.- Throws:
QueryEvaluationException
-
handleClose
protected final void handleClose() throws QueryEvaluationException
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
-
-