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 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.BigIntegervalue
-
Constructor Summary
Constructors Modifier Constructor Description privateBigIntegerCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long val)Adds the given number to this counter.booleanequals(java.lang.Object obj)longget()Gets the counter as a long.java.math.BigIntegergetBigInteger()Gets the counter as a BigInteger.java.lang.LonggetLong()Gets the counter as a Long.inthashCode()voidincrement()Adds one to this counter.java.lang.StringtoString()
-
-
-
Method Detail
-
add
public void add(long val)
Description copied from interface:Counters.CounterAdds the given number to this counter.- Specified by:
addin interfaceCounters.Counter- Parameters:
val- the value to add.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
get
public long get()
Description copied from interface:Counters.CounterGets the counter as a long.- Specified by:
getin interfaceCounters.Counter- Returns:
- the counter as a long.
-
getBigInteger
public java.math.BigInteger getBigInteger()
Description copied from interface:Counters.CounterGets the counter as a BigInteger.- Specified by:
getBigIntegerin interfaceCounters.Counter- Returns:
- the counter as a BigInteger.
-
getLong
public java.lang.Long getLong()
Description copied from interface:Counters.CounterGets the counter as a Long.- Specified by:
getLongin interfaceCounters.Counter- Returns:
- the counter as a Long.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
increment
public void increment()
Description copied from interface:Counters.CounterAdds one to this counter.- Specified by:
incrementin interfaceCounters.Counter
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-