private static final class Counters.BigIntegerCounter extends java.lang.Object implements Counters.Counter
BigInteger
number.Modifier and Type | Field and Description |
---|---|
private java.math.BigInteger |
value |
Modifier | Constructor and Description |
---|---|
private |
BigIntegerCounter() |
Modifier and Type | Method and Description |
---|---|
void |
add(long val)
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 val)
Counters.Counter
add
in interface Counters.Counter
val
- 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 void reset()
Counters.Counter
reset
in interface Counters.Counter
public java.lang.String toString()
toString
in class java.lang.Object