public final class MergedIterator<T extends java.lang.Comparable<T>>
extends java.lang.Object
implements java.util.Iterator<T>
If built with removeDuplicates
set to true and an element
appears in multiple iterators then it is deduplicated, that is this iterator
returns the sorted union of elements.
If built with removeDuplicates
set to false then all elements
in all iterators are returned.
Caveats:
Constructor and Description |
---|
MergedIterator(boolean removeDuplicates,
java.util.Iterator<T>... iterators) |
MergedIterator(java.util.Iterator<T>... iterators) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
void |
remove() |
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.