Package org.apache.druid.collections
Class CombiningIterable<T>
- java.lang.Object
-
- org.apache.druid.collections.CombiningIterable<T>
-
-
Constructor Summary
Constructors Constructor Description CombiningIterable(Iterable<T> it, Comparator<T> comparator, BinaryOperator<T> fn)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> CombiningIterable<T>
create(Iterable<T> it, Comparator<T> comparator, BinaryOperator<T> fn)
static <T> CombiningIterable<T>
createSplatted(Iterable<? extends Iterable<T>> in, Comparator<T> comparator)
Creates a CombiningIterable around a MergeIterable such that equivalent elements are thrown away If there are multiple Iterables in parameter "in" with equivalent objects, there are no guarantees around which object will win.Iterator<T>
iterator()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
CombiningIterable
public CombiningIterable(Iterable<T> it, Comparator<T> comparator, BinaryOperator<T> fn)
-
-
Method Detail
-
createSplatted
public static <T> CombiningIterable<T> createSplatted(Iterable<? extends Iterable<T>> in, Comparator<T> comparator)
Creates a CombiningIterable around a MergeIterable such that equivalent elements are thrown away If there are multiple Iterables in parameter "in" with equivalent objects, there are no guarantees around which object will win. You will get *some* object from one of the Iterables, but which Iterable is unknown.- Type Parameters:
T
- Type of object- Parameters:
in
- An Iterable of Iterables to be mergedcomparator
- the Comparator to determine sort and equality- Returns:
- An Iterable that is the merge of all Iterables from in such that there is only one instance of equivalent objects.
-
create
public static <T> CombiningIterable<T> create(Iterable<T> it, Comparator<T> comparator, BinaryOperator<T> fn)
-
-