private static final class Counters.LongCounter extends java.lang.Object implements Counters.Counter
Modifier and Type | Field and Description |
---|---|
private long |
value |
Modifier | Constructor and Description |
---|---|
private |
LongCounter() |
Modifier and Type | Method and Description |
---|---|
void |
add(long add)
Adds the given number to this counter.
|
boolean |
equals(java.lang.Object obj) |
long |
get()
Gets the counter as a long.
|
java.math.BigInteger |
getBigInteger()
Gets the counter as a BigInteger.
|
java.lang.Long |
getLong()
Gets the counter as a Long.
|
int |
hashCode() |
void |
increment()
Adds one to this counter.
|
void |
reset()
Resets this count to 0.
|
java.lang.String |
toString() |
public void add(long add)
Counters.Counter
add
in interface Counters.Counter
add
- the value to add.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public long get()
Counters.Counter
get
in interface Counters.Counter
public java.math.BigInteger getBigInteger()
Counters.Counter
getBigInteger
in interface Counters.Counter
public java.lang.Long getLong()
Counters.Counter
getLong
in interface Counters.Counter
public int hashCode()
hashCode
in class java.lang.Object
public void increment()
Counters.Counter
increment
in interface Counters.Counter
public java.lang.String toString()
toString
in class java.lang.Object
public void reset()
Counters.Counter
reset
in interface Counters.Counter