Class DirectoryWalker.DirStackEntry

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int count
      Count of files in the directory.
      private java.io.File dir
      Current Directory.
      private int index
      Index (or offset) within the directory count.
      private double percentageOffset
      Offset for percentage calculations.
      private double percentageSize
      Size of percentage space to work with.
    • Constructor Summary

      Constructors 
      Constructor Description
      DirStackEntry​(java.io.File d, int length)
      Create a DirStackEntry.
    • Field Detail

      • count

        private final int count
        Count of files in the directory.
      • dir

        private final java.io.File dir
        Current Directory.
      • index

        private int index
        Index (or offset) within the directory count.
      • percentageOffset

        private double percentageOffset
        Offset for percentage calculations. Based on parent DirStackEntry.
      • percentageSize

        private double percentageSize
        Size of percentage space to work with.
    • Constructor Detail

      • DirStackEntry

        DirStackEntry​(java.io.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object