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
Constructors Constructor Description TripleSourceIterationWrapper(CloseableIteration<? extends T,SailException> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this iteration, freeing any resources that it is holding.booleanhasNext()Checks whether the underlying iteration contains more elements.Tnext()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, wait
-
Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration
stream
-
-
-
-
Constructor Detail
-
TripleSourceIterationWrapper
public TripleSourceIterationWrapper(CloseableIteration<? extends T,SailException> delegate)
-
-
Method Detail
-
hasNext
public boolean hasNext() throws QueryEvaluationExceptionChecks 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
public T next() throws QueryEvaluationException
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
public void remove() throws QueryEvaluationExceptionCalls 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
public final void close() throws QueryEvaluationExceptionDescription 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
-
-