Package com.codahale.metrics
Class Counter
- java.lang.Object
-
- com.codahale.metrics.Counter
-
-
Constructor Summary
Constructors Constructor Description Counter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddec()Decrement the counter by one.voiddec(long n)Decrement the counter byn.longgetCount()Returns the counter's current value.voidinc()Increment the counter by one.voidinc(long n)Increment the counter byn.
-
-
-
Method Detail
-
inc
public void inc()
Increment the counter by one.
-
inc
public void inc(long n)
Increment the counter byn.- Parameters:
n- the amount by which the counter will be increased
-
dec
public void dec()
Decrement the counter by one.
-
dec
public void dec(long n)
Decrement the counter byn.- Parameters:
n- the amount by which the counter will be decreased
-
-