public class MedianStatsCollector extends AbstractDelegatingStatsCollector
MedianStatsCollector computes the median.| Modifier and Type | Field and Description |
|---|---|
protected double |
median |
delegate, statsList| Constructor and Description |
|---|
MedianStatsCollector(StatsCollector delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
collect(int doc)
Collect values from the value source and add to statistics.
|
void |
compute()
After all documents have been collected, this method should be
called to finalize the calculations of each statistic.
|
Double |
getMedian() |
Comparable |
getStat(String stat)
Return the value of the given statistic.
|
delegate, getFunction, getStatsList, getValue, setNextReader, valueSourceStringpublic MedianStatsCollector(StatsCollector delegate)
public Double getMedian()
public Comparable getStat(String stat)
StatsCollectorstat - the statpublic void compute()
StatsCollectorpublic void collect(int doc)
StatsCollectorcollect in interface StatsCollectorcollect in class AbstractDelegatingStatsCollectordoc - Document to collect fromCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.