Class DualUnionIteration<E, X extends Exception>
java.lang.Object
org.eclipse.rdf4j.common.iteration.DualUnionIteration<E,X>
- All Implemented Interfaces:
AutoCloseable, CloseableIteration<E,X>, Iteration<E, X>
@Deprecated(since="4.1.0")
public class DualUnionIteration<E, X extends Exception>
extends Object
implements CloseableIteration<E,X>
Deprecated.
Provides a bag union of the two provided iterations.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanDeprecated.Flag indicating whether this iteration has been closed.private CloseableIteration<? extends E, X> Deprecated.private CloseableIteration<? extends E, X> Deprecated.private EDeprecated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateDualUnionIteration(CloseableIteration<? extends E, X> iteration1, CloseableIteration<? extends E, X> iteration2) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()Deprecated.Closes this iteration, freeing any resources that it is holding.static <E, X extends Exception>
CloseableIteration<E, X> getInstance(CloseableIteration<E, X> leftIteration, CloseableIteration<E, X> rightIteration) Deprecated.Deprecated.static <E, X extends Exception>
CloseableIteration<? extends E, X> getWildcardInstance(CloseableIteration<? extends E, X> leftIteration, CloseableIteration<? extends E, X> rightIteration) Deprecated.final booleanhasNext()Deprecated.Returns true if the iteration has more elements.private EDeprecated.Fetches the next element if it hasn't been fetched yet and stores it innextElement.final Enext()Deprecated.Returns the next element in the iteration.voidremove()Deprecated.Throws anUnsupportedOperationException.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseableIteration
stream
-
Field Details
-
iteration1
Deprecated. -
iteration2
Deprecated. -
nextElement
Deprecated. -
closed
private boolean closedDeprecated.Flag indicating whether this iteration has been closed.
-
-
Constructor Details
-
DualUnionIteration
private DualUnionIteration(CloseableIteration<? extends E, X> iteration1, CloseableIteration<? extends E, X> iteration2) Deprecated.
-
-
Method Details
-
getWildcardInstance
public static <E, X extends Exception> CloseableIteration<? extends E, X> getWildcardInstance(CloseableIteration<? extends E, X> leftIteration, CloseableIteration<? extends E, X> rightIteration) Deprecated. -
getInstance
public static <E, X extends Exception> CloseableIteration<E,X> getInstance(CloseableIteration<E, X> leftIteration, CloseableIteration<E, X> rightIteration) Deprecated. -
getNextElement
-
hasNext
public final boolean hasNext() throws XDeprecated.Description copied from interface:IterationReturns true if the iteration has more elements. (In other words, returns true ifIteration.next()would return an element rather than throwing a NoSuchElementException.) -
next
-
lookAhead
Deprecated.Fetches the next element if it hasn't been fetched yet and stores it innextElement.- Returns:
- The next element, or null if there are no more results.
- Throws:
X- If there is an issue getting the next element or closing the iteration.
-
remove
-
close
public final void close() throws XDeprecated.Description 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<E, X extends Exception>- Throws:
X
-