Package org.eclipse.rdf4j.sail
Class TripleSourceIterationWrapper<T>
java.lang.Object
org.eclipse.rdf4j.sail.TripleSourceIterationWrapper<T>
- All Implemented Interfaces:
AutoCloseable
,Iterator<T>
,CloseableIteration<T>
@InternalUseOnly
public class TripleSourceIterationWrapper<T>
extends Object
implements CloseableIteration<T>
-
Constructor Summary
-
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
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
TripleSourceIterationWrapper
-
-
Method Details
-
hasNext
Checks whether the underlying iteration contains more elements.- Specified by:
hasNext
in interfaceIterator<T>
- 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 interfaceIterator<T>
- 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 interfaceIterator<T>
- 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>
- Throws:
QueryEvaluationException
-