public class DebugHistogramAsciiPrinter extends Object implements DebugHistogram.Printer
Modifier and Type | Field and Description |
---|---|
private int |
barSize |
static int |
DefaultBarSize |
static int |
DefaultNameSize |
static int |
DefaultScale |
private int |
limit |
private int |
nameSize |
static int |
NumberSize |
private PrintStream |
os |
private int |
scale |
Constructor and Description |
---|
DebugHistogramAsciiPrinter(PrintStream os) |
DebugHistogramAsciiPrinter(PrintStream os,
int limit,
int nameSize,
int barSize,
int scale) |
Modifier and Type | Method and Description |
---|---|
void |
print(DebugHistogram histogram) |
private static void |
printLine(PrintStream printStream,
char c,
int lineSize) |
public static final int NumberSize
public static final int DefaultNameSize
public static final int DefaultBarSize
public static final int DefaultScale
private final PrintStream os
private final int limit
private final int nameSize
private final int barSize
private final int scale
public DebugHistogramAsciiPrinter(PrintStream os)
public DebugHistogramAsciiPrinter(PrintStream os, int limit, int nameSize, int barSize, int scale)
os
- where to printlimit
- limits printing to the limit
most frequent valuesnameSize
- the width of the value names columnbarSize
- the width of the value frequency columnscale
- a factor by which every result is dividedpublic void print(DebugHistogram histogram)
print
in interface DebugHistogram.Printer
private static void printLine(PrintStream printStream, char c, int lineSize)