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.
-
Constructor Summary
ConstructorDescriptionDualUnionIteration
(Comparator<E> cmp, CloseableIteration<? extends E> iteration1, CloseableIteration<? extends E> iteration2) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
close()
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 boolean
hasNext()
final E
next()
void
remove()
Throws anUnsupportedOperationException
.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
-
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: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<E>
-