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 void
close()
Closes this iteration, freeing any resources that it is holding.boolean
hasNext()
Checks whether the underlying iteration contains more elements.T
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 Detail
-
TripleSourceIterationWrapper
public TripleSourceIterationWrapper(CloseableIteration<? extends T,SailException> delegate)
-
-
Method Detail
-
hasNext
public boolean hasNext() throws QueryEvaluationException
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
public T next() throws QueryEvaluationException
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
public void remove() throws QueryEvaluationException
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
public final void close() throws QueryEvaluationException
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
-
-