Package org.apache.commons.io.file
Class Counters.BigIntegerCounter
java.lang.Object
org.apache.commons.io.file.Counters.BigIntegerCounter
- All Implemented Interfaces:
Counters.Counter
- Enclosing class:
- Counters
Counts using a BigInteger number.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long val) Adds the given number to this counter.boolean
long
get()
Gets the counter as a long.Gets the counter as a BigInteger.getLong()
Gets the counter as a Long.int
hashCode()
void
Adds one to this counter.void
reset()
Resets this count to 0.toString()
-
Field Details
-
value
-
-
Constructor Details
-
BigIntegerCounter
private BigIntegerCounter()
-
-
Method Details
-
add
public void add(long val) Description copied from interface:Counters.Counter
Adds the given number to this counter.- Specified by:
add
in interfaceCounters.Counter
- Parameters:
val
- the value to add.
-
equals
-
get
public long get()Description copied from interface:Counters.Counter
Gets the counter as a long.- Specified by:
get
in interfaceCounters.Counter
- Returns:
- the counter as a long.
-
getBigInteger
Description copied from interface:Counters.Counter
Gets the counter as a BigInteger.- Specified by:
getBigInteger
in interfaceCounters.Counter
- Returns:
- the counter as a BigInteger.
-
getLong
Description copied from interface:Counters.Counter
Gets the counter as a Long.- Specified by:
getLong
in interfaceCounters.Counter
- Returns:
- the counter as a Long.
-
hashCode
public int hashCode() -
increment
public void increment()Description copied from interface:Counters.Counter
Adds one to this counter.- Specified by:
increment
in interfaceCounters.Counter
-
toString
-
reset
public void reset()Description copied from interface:Counters.Counter
Resets this count to 0.- Specified by:
reset
in interfaceCounters.Counter
-