Package org.apache.commons.io.file
Class Counters.AbstractPathCounters
- java.lang.Object
-
- org.apache.commons.io.file.Counters.AbstractPathCounters
-
- All Implemented Interfaces:
Counters.PathCounters
- Direct Known Subclasses:
Counters.BigIntegerPathCounters,Counters.LongPathCounters
- Enclosing class:
- Counters
private static class Counters.AbstractPathCounters extends java.lang.Object implements Counters.PathCounters
Counts files, directories, and sizes, as a visit proceeds.
-
-
Field Summary
Fields Modifier and Type Field Description private Counters.CounterbyteCounterprivate Counters.CounterdirectoryCounterprivate Counters.CounterfileCounter
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPathCounters(Counters.Counter byteCounter, Counters.Counter directoryCounter, Counters.Counter fileCounter)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Counters.CountergetByteCounter()Gets the byte counter.Counters.CountergetDirectoryCounter()Gets the directory counter.Counters.CountergetFileCounter()Gets the count of visited files.inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
byteCounter
private final Counters.Counter byteCounter
-
directoryCounter
private final Counters.Counter directoryCounter
-
fileCounter
private final Counters.Counter fileCounter
-
-
Constructor Detail
-
AbstractPathCounters
protected AbstractPathCounters(Counters.Counter byteCounter, Counters.Counter directoryCounter, Counters.Counter fileCounter)
Constructs a new instance.- Parameters:
byteCounter- the byte counter.directoryCounter- the directory counter.fileCounter- the file counter.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getByteCounter
public Counters.Counter getByteCounter()
Description copied from interface:Counters.PathCountersGets the byte counter.- Specified by:
getByteCounterin interfaceCounters.PathCounters- Returns:
- the byte counter.
-
getDirectoryCounter
public Counters.Counter getDirectoryCounter()
Description copied from interface:Counters.PathCountersGets the directory counter.- Specified by:
getDirectoryCounterin interfaceCounters.PathCounters- Returns:
- the directory counter.
-
getFileCounter
public Counters.Counter getFileCounter()
Gets the count of visited files.- Specified by:
getFileCounterin interfaceCounters.PathCounters- Returns:
- the byte count of visited files.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-