Class Finder.Secondary

    • Field Detail

      • next

        private java.io.File next
        The next file to be returned by next() if any, i.e. if hasNext() returns true; otherwise this field is null.
      • encl

        private final Finder encl
        The source finder from which the stream of files is read. **** this is superfluous if this is not static
      • filter

        private final Finder.Filter filter
        The filter to be passed before a file is returned by next().
    • Constructor Detail

      • Secondary

        Secondary​(Finder encl,
                  Finder.Filter filter)
        Create a finder receiving a stream of files from encl and passing them further via next() if they pass the filter filter.
    • Method Detail

      • updateNext

        protected void updateNext()
      • hasNext

        public boolean hasNext()
        Description copied from class: Finder
        Returns whether this Finder can emit another file.
        Specified by:
        hasNext in class Finder
        See Also:
        Finder.next()
      • next

        public java.io.File next()
        Description copied from class: Finder
        Returns the next file this finder can emit. This does not throw an exception iff Finder.hasNext() returns true.
        Specified by:
        next in class Finder
      • getNext

        protected java.io.File getNext()