org.codehaus.plexus.util

Class DirectoryWalker.DirStackEntry

class DirectoryWalker.DirStackEntry extends Object

DirStackEntry is an Item on the dirStack
Field Summary
intcount
Count of files in the directory.
Filedir
Current Directory.
intindex
Index (or offset) within the directory count.
doublepercentageOffset
Offset for percentage calculations.
doublepercentageSize
Size of percentage space to work with.
Constructor Summary
DirStackEntry(File d, int length)
Create a DirStackEntry.
Method Summary
doublegetNextPercentageOffset()
Calculate the next percentage offset.
doublegetNextPercentageSize()
Calculate the next percentage size.
intgetPercentage()
The percentage of the DirStackEntry right now.
StringtoString()

Field Detail

count

public int count
Count of files in the directory.

dir

public File dir
Current Directory.

index

public int index
Index (or offset) within the directory count.

percentageOffset

public double percentageOffset
Offset for percentage calculations. Based on parent DirStackEntry.

percentageSize

public double percentageSize
Size of percentage space to work with.

Constructor Detail

DirStackEntry

public DirStackEntry(File d, int length)
Create a DirStackEntry.

Parameters: d the directory to track length the length of entries in the directory.

Method Detail

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

public String toString()