public class Counters extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Counters.Counter
A Counter counts an arbitrary set of named "values", typically Strings.
|
| Constructor and Description |
|---|
Counters() |
| Modifier and Type | Method and Description |
|---|---|
Counters.Counter |
add(String name)
Add a new Counter with the given name.
|
void |
addTo(Counters sub) |
Counters.Counter |
count(String name,
Comparable<?> value)
Add value to the named Counter.
|
Counters.Counter |
get(String name)
Get the named Counter.
|
Counters |
makeSubCounters() |
void |
reset()
Reset all the Counters to be empty.
|
void |
show(Formatter f)
Show a summary of the Counter's
|
String |
toString() |
public Counters.Counter add(String name)
public void reset()
public void show(Formatter f)
@Nullable public Counters.Counter get(String name)
public Counters.Counter count(String name, Comparable<?> value)
public void addTo(Counters sub)
public Counters makeSubCounters()