public class DebugHistogramImpl extends Object implements DebugHistogram
DebugHistogram.CountedValue, DebugHistogram.Printer
Modifier and Type | Field and Description |
---|---|
private HashMap<Object,DebugHistogram.CountedValue> |
map |
private String |
name |
Constructor and Description |
---|
DebugHistogramImpl(String name) |
Modifier and Type | Method and Description |
---|---|
void |
add(Object value)
Increments the count for a given value.
|
void |
add(Object value,
long count) |
String |
getName()
Gets the name specified when this objected was created.
|
List<DebugHistogram.CountedValue> |
getValues()
Gets a list of the counted values, sorted in descending order of frequency.
|
private HashMap<Object,DebugHistogram.CountedValue> map
public DebugHistogramImpl(String name)
public void add(Object value)
DebugHistogram
add
in interface DebugHistogram
public void add(Object value, long count)
add
in interface DebugHistogram
public String getName()
DebugHistogram
getName
in interface DebugHistogram
public List<DebugHistogram.CountedValue> getValues()
DebugHistogram
getValues
in interface DebugHistogram