Package eu.simuline.util
Class Finder.Secondary
- java.lang.Object
-
- eu.simuline.util.Finder
-
- eu.simuline.util.Finder.Secondary
-
- Direct Known Subclasses:
Finder.PrintFilter
- Enclosing class:
- Finder
static class Finder.Secondary extends Finder
A finder wrapping aFinder.Filter. Files are read fromencland are passed vianext()iff they pass the filterfilter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.simuline.util.Finder
Finder.AndFilter, Finder.Callable, Finder.ExecFilter, Finder.ExecJavaFilter, Finder.Filter, Finder.NameFilter, Finder.NegFilter, Finder.OrFilter, Finder.Primary, Finder.PrintFilter, Finder.Secondary
-
-
Constructor Summary
Constructors Constructor Description Secondary(Finder encl, Finder.Filter filter)Create a finder receiving a stream of files fromencland passing them further vianext()if they pass the filterfilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FilegetNext()booleanhasNext()Returns whether this Finder can emit another file.Filenext()Returns the next file this finder can emit.protected voidupdateNext()-
Methods inherited from class eu.simuline.util.Finder
add, and, exec, execFilter, execJava, execJavaFilter, main, name, nameFilter, not, or, path, print
-
-
-
-
Field Detail
-
next
private File next
-
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 bynext().
-
-
Constructor Detail
-
Secondary
Secondary(Finder encl, Finder.Filter filter)
Create a finder receiving a stream of files fromencland passing them further vianext()if they pass the filterfilter.
-
-
Method Detail
-
updateNext
protected void updateNext()
-
hasNext
public boolean hasNext()
Description copied from class:FinderReturns whether this Finder can emit another file.- Specified by:
hasNextin classFinder- See Also:
Finder.next()
-
next
public File next()
Description copied from class:FinderReturns the next file this finder can emit. This does not throw an exception iffFinder.hasNext()returns true.
-
getNext
protected File getNext()
-
-