Class DualUnionIteration<E>
java.lang.Object
org.eclipse.rdf4j.common.iteration.DualUnionIteration<E>
- All Implemented Interfaces:
AutoCloseable, Iterator<E>, CloseableIteration<E>
Provides a bag union of the two provided iterations.
-
Field Summary
Fields inherited from interface CloseableIteration
EMPTY_STATEMENT_ITERATION -
Constructor Summary
ConstructorsConstructorDescriptionDualUnionIteration(Comparator<E> cmp, CloseableIteration<? extends E> iteration1, CloseableIteration<? extends E> iteration2) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclose()Closes this iteration, freeing any resources that it is holding.static <E> CloseableIteration<E> getInstance(CloseableIteration<E> leftIteration, CloseableIteration<E> rightIteration) static <E> CloseableIteration<? extends E> getWildcardInstance(Comparator<E> cmp, CloseableIteration<? extends E> leftIteration, CloseableIteration<? extends E> rightIteration) static <E> CloseableIteration<? extends E> getWildcardInstance(CloseableIteration<? extends E> leftIteration, CloseableIteration<? extends E> rightIteration) final booleanhasNext()final Enext()voidremove()Throws anUnsupportedOperationException.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CloseableIteration
streamMethods inherited from interface Iterator
forEachRemaining
-
Constructor Details
-
DualUnionIteration
@Experimental public DualUnionIteration(Comparator<E> cmp, CloseableIteration<? extends E> iteration1, CloseableIteration<? extends E> iteration2)
-
-
Method Details
-
getWildcardInstance
public static <E> CloseableIteration<? extends E> getWildcardInstance(CloseableIteration<? extends E> leftIteration, CloseableIteration<? extends E> rightIteration) -
getWildcardInstance
@Experimental public static <E> CloseableIteration<? extends E> getWildcardInstance(Comparator<E> cmp, CloseableIteration<? extends E> leftIteration, CloseableIteration<? extends E> rightIteration) -
getInstance
public static <E> CloseableIteration<E> getInstance(CloseableIteration<E> leftIteration, CloseableIteration<E> rightIteration) -
hasNext
-
next
-
remove
public void remove()Throws anUnsupportedOperationException. -
close
public final void close()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>
-