Package org.apache.commons.io.file
Class Counters.LongCounter
java.lang.Object
org.apache.commons.io.file.Counters.LongCounter
- All Implemented Interfaces:
Counters.Counter
- Enclosing class:
Counters
Counts using a
long number.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long add) Adds the given number to this counter.booleanlongget()Gets the counter as a long.Gets the counter as a BigInteger.getLong()Gets the counter as a Long.inthashCode()voidAdds one to this counter.voidreset()Resets this count to 0.toString()
-
Field Details
-
value
private long value
-
-
Constructor Details
-
LongCounter
private LongCounter()
-
-
Method Details
-
add
public void add(long add) Description copied from interface:Counters.CounterAdds the given number to this counter.- Specified by:
addin interfaceCounters.Counter- Parameters:
add- the value to add.
-
equals
-
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
Description copied from interface:Counters.CounterGets the counter as a BigInteger.- Specified by:
getBigIntegerin interfaceCounters.Counter- Returns:
- the counter as a BigInteger.
-
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() -
increment
public void increment()Description copied from interface:Counters.CounterAdds one to this counter.- Specified by:
incrementin interfaceCounters.Counter
-
reset
public void reset()Description copied from interface:Counters.CounterResets this count to 0.- Specified by:
resetin interfaceCounters.Counter
-
toString
-