Class DirIterator

  • All Implemented Interfaces:
    java.util.Iterator<FileLister.Entry>

    class DirIterator
    extends FileContainer
    Preorder traversal of a directory. Returns everything including directory names.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private class  DirIterator.DirEntry  
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.io.File root  
      (package private) java.lang.String rootpath  
      (package private) java.util.Stack<java.io.File> stack  
    • Constructor Summary

      Constructors 
      Constructor Description
      DirIterator​(java.io.File f)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean hasNext()  
      FileLister.Entry next()  
      (package private) FileLister.Entry open​(java.lang.String fileName)  
      void remove()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining
    • Field Detail

      • root

        final java.io.File root
      • rootpath

        java.lang.String rootpath
      • stack

        java.util.Stack<java.io.File> stack
    • Constructor Detail

      • DirIterator

        DirIterator​(java.io.File f)
    • Method Detail

      • hasNext

        public boolean hasNext()
      • remove

        public void remove()