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.NoopCounterINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateNoopCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(long add)Adds the given number to this counter.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.voidincrement()Adds one to this counter.java.lang.StringtoString()Returns"0", always.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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.CounterAdds the given number to this counter.- Specified by:
addin interfaceCounters.Counter- Parameters:
add- the value to add.
-
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.
-
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()
Returns"0", always.- Overrides:
toStringin classjava.lang.Object- Returns:
"0", always.- Since:
- 2.12.0
-
-