Class TopNSequence<T>
- java.lang.Object
-
- org.apache.druid.java.util.common.guava.BaseSequence<T,Iterator<T>>
-
- org.apache.druid.java.util.common.guava.TopNSequence<T>
-
- All Implemented Interfaces:
Sequence<T>
public class TopNSequence<T> extends BaseSequence<T,Iterator<T>>
Simultaneously sorts and limits its input. The sort is stable, meaning that equal elements (as determined by the comparator) will not be reordered.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.druid.java.util.common.guava.BaseSequence
BaseSequence.IteratorMaker<T,IterType extends Iterator<T>>
-
-
Constructor Summary
Constructors Constructor Description TopNSequence(Sequence<T> input, Comparator<T> ordering, int limit)
-
-
-
Constructor Detail
-
TopNSequence
public TopNSequence(Sequence<T> input, Comparator<T> ordering, int limit)
-
-