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,Counters.NoopPathCounters
- Enclosing class:
Counters
Counts files, directories, and sizes, as a visit proceeds.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Counters.Counterprivate final Counters.Counterprivate final Counters.Counter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPathCounters(Counters.Counter byteCounter, Counters.Counter directoryCounter, Counters.Counter fileCounter) Constructs a new instance. -
Method Summary
-
Field Details
-
byteCounter
-
directoryCounter
-
fileCounter
-
-
Constructor Details
-
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 Details
-
equals
-
getByteCounter
Description copied from interface:Counters.PathCountersGets the byte counter.- Specified by:
getByteCounterin interfaceCounters.PathCounters- Returns:
- the byte counter.
-
getDirectoryCounter
Description copied from interface:Counters.PathCountersGets the directory counter.- Specified by:
getDirectoryCounterin interfaceCounters.PathCounters- Returns:
- the directory counter.
-
getFileCounter
Gets the count of visited files.- Specified by:
getFileCounterin interfaceCounters.PathCounters- Returns:
- the byte count of visited files.
-
hashCode
public int hashCode() -
reset
public void reset()Description copied from interface:Counters.PathCountersResets the counts to 0.- Specified by:
resetin interfaceCounters.PathCounters
-
toString
-