Class ConvertingIteration<S,T>
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<T>
org.eclipse.rdf4j.common.iteration.ConvertingIteration<S,T>
- All Implemented Interfaces:
AutoCloseable
,Iterator<T>
,CloseableIteration<T>
- Direct Known Subclasses:
BoundJoinConversionIteration
,BoundJoinVALUESConversionIteration
,ExtensionIterator
,GroupedCheckConversionIteration
,InsertBindingsIteration
,ProjectionIterator
,ServiceJoinConversionIteration
@Deprecated(since="4.1.0")
public abstract class ConvertingIteration<S,T>
extends AbstractCloseableIteration<T>
Deprecated.
A CloseableIteration that converts an iteration over objects of type S (the source type) to an iteration
over objects of type T (the target type).
-
Constructor Summary
ModifierConstructorDescriptionprotected
ConvertingIteration
(CloseableIteration<? extends S> iter) Deprecated.Creates a new ConvertingIteration that operates on the supplied source type iteration. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract T
Deprecated.Converts a source type object to a target type object.protected void
Deprecated.Closes this iteration as well as the wrapped iteration if it is aCloseableIteration
.boolean
hasNext()
Deprecated.Checks whether the source type iteration contains more elements.next()
Deprecated.Returns the next element from the source type iteration.void
remove()
Deprecated.Calls remove() on the underlying Iteration.Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration
close, isClosed
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
-
ConvertingIteration
Deprecated.Creates a new ConvertingIteration that operates on the supplied source type iteration.- Parameters:
iter
- The source type iteration for this ConvertingIteration, must not be null.
-
-
Method Details
-
convert
Deprecated.Converts a source type object to a target type object. -
hasNext
public boolean hasNext()Deprecated.Checks whether the source type iteration contains more elements.- Returns:
- true if the source type iteration contains more elements, false otherwise.
-
next
Deprecated.Returns the next element from the source type iteration.- Throws:
NoSuchElementException
- If all elements have been returned.IllegalStateException
- If the iteration has been closed.
-
remove
public void remove()Deprecated.Calls remove() on the underlying Iteration.- 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()
.
-
handleClose
protected void handleClose()Deprecated.Closes this iteration as well as the wrapped iteration if it is aCloseableIteration
.- Overrides:
handleClose
in classAbstractCloseableIteration<T>
-