Package org.codehaus.plexus.util
Class DirectoryWalker.DirStackEntry
java.lang.Object
org.codehaus.plexus.util.DirectoryWalker.DirStackEntry
- Enclosing class:
DirectoryWalker
DirStackEntry is an Item on the
DirectoryWalker.dirStack
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
Count of files in the directory.Current Directory.int
Index (or offset) within the directory count.double
Offset for percentage calculations.double
Size of percentage space to work with. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
Calculate the next percentage offset.double
Calculate the next percentage size.int
The percentage of the DirStackEntry right now.toString()
-
Field Details
-
count
public int countCount of files in the directory. -
dir
Current Directory. -
index
public int indexIndex (or offset) within the directory count. -
percentageOffset
public double percentageOffsetOffset for percentage calculations. Based on parent DirStackEntry. -
percentageSize
public double percentageSizeSize of percentage space to work with.
-
-
Constructor Details
-
DirStackEntry
Create a DirStackEntry.- Parameters:
d
- the directory to tracklength
- the length of entries in the directory.
-
-
Method Details
-
getNextPercentageOffset
public double getNextPercentageOffset()Calculate the next percentage offset. Used by the next DirStackEntry.- Returns:
- the value for the next percentage offset.
-
getNextPercentageSize
public double getNextPercentageSize()Calculate the next percentage size. Used by the next DirStackEntry.- Returns:
- the value for the next percentage size.
-
getPercentage
public int getPercentage()The percentage of the DirStackEntry right now. Based on count, index, percentageOffset, and percentageSize.- Returns:
- the percentage right now.
-
toString
-