Package org.eclipse.rdf4j.sail
Class TripleSourceIterationWrapper<T>
java.lang.Object
org.eclipse.rdf4j.sail.TripleSourceIterationWrapper<T>
- All Implemented Interfaces:
AutoCloseable
,CloseableIteration<T,
,QueryEvaluationException> Iteration<T,
QueryEvaluationException>
@InternalUseOnly
public class TripleSourceIterationWrapper<T>
extends Object
implements CloseableIteration<T,QueryEvaluationException>
-
Constructor Summary
ConstructorDescriptionTripleSourceIterationWrapper
(CloseableIteration<? extends T, SailException> delegate) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
close()
Closes this iteration, freeing any resources that it is holding.boolean
hasNext()
Checks whether the underlying iteration contains more elements.next()
Returns the next element from the wrapped iteration.void
remove()
Calls remove() on the underlying iteration.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
-
TripleSourceIterationWrapper
-
-
Method Details
-
hasNext
Checks whether the underlying iteration contains more elements.- Specified by:
hasNext
in interfaceIteration<T,
QueryEvaluationException> - Returns:
- true if the underlying iteration contains more elements, false otherwise.
- Throws:
QueryEvaluationException
-
next
Returns the next element from the wrapped iteration.- Specified by:
next
in interfaceIteration<T,
QueryEvaluationException> - Returns:
- the next element in the iteration.
- Throws:
QueryEvaluationException
NoSuchElementException
- If all elements have been returned.IllegalStateException
- If the iteration has been closed.
-
remove
Calls remove() on the underlying iteration.- Specified by:
remove
in interfaceIteration<T,
QueryEvaluationException> - Throws:
UnsupportedOperationException
- If the wrapped iteration does not support the remove operation.IllegalStateException
- If the Iteration has been closed, or ifnext()
has not yet been called, orremove()
has already been called after the last call tonext()
.QueryEvaluationException
-
close
Description copied from interface:CloseableIteration
Closes this iteration, freeing any resources that it is holding. If the iteration has already been closed then invoking this method has no effect.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseableIteration<T,
QueryEvaluationException> - Throws:
QueryEvaluationException
-