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
private static final class Counters.BigIntegerCounter extends java.lang.Object implements Counters.Counter
Counts using a BigInteger number.
-
-
Field Summary
Fields Modifier and Type Field Description private java.math.BigInteger
value
-
Constructor Summary
Constructors Modifier Constructor Description private
BigIntegerCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Method Detail
-
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
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
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
public java.math.BigInteger 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
public java.lang.Long 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()
- Overrides:
hashCode
in classjava.lang.Object
-
increment
public void increment()
Description copied from interface:Counters.Counter
Adds one to this counter.- Specified by:
increment
in interfaceCounters.Counter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
reset
public void reset()
Description copied from interface:Counters.Counter
Resets this count to 0.- Specified by:
reset
in interfaceCounters.Counter
-
-