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.Counter
private final Counters.Counter
private final Counters.Counter
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractPathCounters
(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.PathCounters
Gets the byte counter.- Specified by:
getByteCounter
in interfaceCounters.PathCounters
- Returns:
- the byte counter.
-
getDirectoryCounter
Description copied from interface:Counters.PathCounters
Gets the directory counter.- Specified by:
getDirectoryCounter
in interfaceCounters.PathCounters
- Returns:
- the directory counter.
-
getFileCounter
Gets the count of visited files.- Specified by:
getFileCounter
in interfaceCounters.PathCounters
- Returns:
- the byte count of visited files.
-
hashCode
public int hashCode() -
reset
public void reset()Description copied from interface:Counters.PathCounters
Resets the counts to 0.- Specified by:
reset
in interfaceCounters.PathCounters
-
toString
-