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.Counter
byteCounter
private Counters.Counter
directoryCounter
private Counters.Counter
fileCounter
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractPathCounters(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 boolean
equals(java.lang.Object obj)
Counters.Counter
getByteCounter()
Gets the byte counter.Counters.Counter
getDirectoryCounter()
Gets the directory counter.Counters.Counter
getFileCounter()
Gets the count of visited files.int
hashCode()
java.lang.String
toString()
-
-
-
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:
equals
in classjava.lang.Object
-
getByteCounter
public Counters.Counter getByteCounter()
Description copied from interface:Counters.PathCounters
Gets the byte counter.- Specified by:
getByteCounter
in interfaceCounters.PathCounters
- Returns:
- the byte counter.
-
getDirectoryCounter
public Counters.Counter getDirectoryCounter()
Description copied from interface:Counters.PathCounters
Gets the directory counter.- Specified by:
getDirectoryCounter
in interfaceCounters.PathCounters
- Returns:
- the directory counter.
-
getFileCounter
public Counters.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()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-