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
ConstructorsConstructorDescriptionTripleSourceIterationWrapper(CloseableIteration<? extends T, SailException> delegate) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()Closes this iteration, freeing any resources that it is holding.booleanhasNext()Checks whether the underlying iteration contains more elements.next()Returns the next element from the wrapped iteration.voidremove()Calls remove() on the underlying iteration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
hasNextin 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:
nextin interfaceIteration<T,QueryEvaluationException> - Returns:
- the next element in the iteration.
- Throws:
QueryEvaluationExceptionNoSuchElementException- If all elements have been returned.IllegalStateException- If the iteration has been closed.
-
remove
Calls remove() on the underlying iteration.- Specified by:
removein 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:CloseableIterationCloses 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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableIteration<T,QueryEvaluationException> - Throws:
QueryEvaluationException
-