@API(status=EXPERIMENTAL, since="1.3.0") public class Histogram extends java.lang.Object implements StatisticsReportFormat
Modifier and Type | Class and Description |
---|---|
static class |
Histogram.Bucket |
Constructor and Description |
---|
Histogram() |
Modifier and Type | Method and Description |
---|---|
protected java.util.List<Histogram.Bucket> |
cluster(java.util.List<StatisticsEntry> entries)
Cluster entries into buckets.
|
protected java.util.Comparator<? super StatisticsEntry> |
comparator()
Determine how entries are being sorted from top to bottom.
|
java.util.List<java.lang.String> |
formatReport(java.util.List<StatisticsEntry> entries)
Return a list of report lines.
|
protected java.lang.String |
label(StatisticsEntry entry)
Determine how entries are being labelled in the histogram.
|
protected java.lang.String |
labelColumnHeader()
Change the displayed name of the label column
|
protected int |
maxDrawRange()
Determine how many block characters are maximally used to draw the distribution.
|
public java.util.List<java.lang.String> formatReport(java.util.List<StatisticsEntry> entries)
StatisticsReportFormat
formatReport
in interface StatisticsReportFormat
StatisticsEntry
protected int maxDrawRange()
Can be overridden.
protected java.util.Comparator<? super StatisticsEntry> comparator()
Can be overridden.
protected java.lang.String label(StatisticsEntry entry)
Can be overridden.
entry
- protected java.util.List<Histogram.Bucket> cluster(java.util.List<StatisticsEntry> entries)
Override if entries should be aggregated into buckets to display in histogram.
entries
- An already sorted list of entries@API(status=EXPERIMENTAL, since="1.3.8") protected java.lang.String labelColumnHeader()