Package org.apache.commons.io.file
Class Counters.NoopCounter
- java.lang.Object
-
- org.apache.commons.io.file.Counters.NoopCounter
-
- All Implemented Interfaces:
Counters.Counter
- Enclosing class:
- Counters
private static final class Counters.NoopCounter extends java.lang.Object implements Counters.Counter
Counts nothing.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static Counters.NoopCounter
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
NoopCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(long add)
Adds the given number to this counter.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.void
increment()
Adds one to this counter.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.commons.io.file.Counters.Counter
reset
-
-
-
-
Field Detail
-
INSTANCE
static final Counters.NoopCounter INSTANCE
-
-
Method Detail
-
add
public void add(long add)
Description copied from interface:Counters.Counter
Adds the given number to this counter.- Specified by:
add
in interfaceCounters.Counter
- Parameters:
add
- the value to add.
-
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.
-
increment
public void increment()
Description copied from interface:Counters.Counter
Adds one to this counter.- Specified by:
increment
in interfaceCounters.Counter
-
-