Class ConvertingIteration<S, T, X extends Exception>
java.lang.Object
org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<T,X>
org.eclipse.rdf4j.common.iteration.ConvertingIteration<S,T,X>
- All Implemented Interfaces:
AutoCloseable, CloseableIteration<T,X>, Iteration<T, X>
- Direct Known Subclasses:
ExtensionIterator, ProjectionIterator, ServiceJoinConversionIteration
@Deprecated(since="4.1.0")
public abstract class ConvertingIteration<S, T, X extends Exception>
extends AbstractCloseableIteration<T,X>
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).
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConvertingIteration(Iteration<? extends S, ? extends X> iter) Deprecated.Creates a new ConvertingIteration that operates on the supplied source type iteration. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TDeprecated.Converts a source type object to a target type object.protected voidDeprecated.Closes this iteration as well as the wrapped iteration if it is aCloseableIteration.booleanhasNext()Deprecated.Checks whether the source type iteration contains more elements.next()Deprecated.Returns the next element from the source type iteration.voidremove()Deprecated.Calls remove() on the underlying Iteration.Methods inherited from class AbstractCloseableIteration
close, isClosedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseableIteration
stream
-
Field Details
-
iter
-
-
Constructor Details
-
ConvertingIteration
-
-
Method Details
-
convert
-
hasNext
public boolean hasNext() throws XDeprecated.Checks whether the source type iteration contains more elements.- Returns:
- true if the source type iteration contains more elements, false otherwise.
- Throws:
X
-
next
Deprecated.Returns the next element from the source type iteration.- Returns:
- the next element in the iteration.
- Throws:
XNoSuchElementException- If all elements have been returned.IllegalStateException- If the iteration has been closed.
-
remove
public void remove() throws XDeprecated.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().X
-
handleClose
protected void handleClose() throws XDeprecated.Closes this iteration as well as the wrapped iteration if it is aCloseableIteration.- Overrides:
handleClosein classAbstractCloseableIteration<T, X extends Exception>- Throws:
X
-