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)
DebugHistogramadd in interface DebugHistogrampublic void add(Object value, long count)
add in interface DebugHistogrampublic String getName()
DebugHistogramgetName in interface DebugHistogrampublic List<DebugHistogram.CountedValue> getValues()
DebugHistogramgetValues in interface DebugHistogram