Class Finder.Primary

  • Enclosing class:
    Finder

    static class Finder.Primary
    extends Finder
    The most basic kind of finder: Method Finder.path(File) returns an instance of this. next() returns the given file and, if this is a folder all files therein.
    • Field Detail

      • files

        private final java.util.Stack<java.io.File> files
        The list of files to be returned by next() unwrapping folders recursively.
    • Constructor Detail

      • Primary

        Primary​(java.io.File file)
        Pushes file to files.
      • Primary

        Primary​(java.io.File[] path)
    • Method Detail

      • next

        public java.io.File next()
        If the topmost entry of files is no folder, this is returned as is. otherwise, in addition, this folder is unwrapped and the contents is pushed onto the stack files.
        Specified by:
        next in class Finder