Package eu.simuline.util
Class PathFinder.Secondary
- java.lang.Object
-
- eu.simuline.util.PathFinder
-
- eu.simuline.util.PathFinder.Secondary
-
- Direct Known Subclasses:
PathFinder.PrintFilter
- Enclosing class:
- PathFinder
static class PathFinder.Secondary extends PathFinder
A finder wrapping aPathFinder.Filter. Paths are read fromencland are passed vianext()iff they pass the filterfilter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class eu.simuline.util.PathFinder
PathFinder.AndFilter, PathFinder.Callable, PathFinder.ExecFilter, PathFinder.ExecJavaFilter, PathFinder.Filter, PathFinder.NameFilter, PathFinder.NegFilter, PathFinder.OrFilter, PathFinder.Primary, PathFinder.PrintFilter, PathFinder.Secondary
-
-
Field Summary
Fields Modifier and Type Field Description private PathFinderenclThe source finder from which the stream of paths is read. **** this is superfluous if this is not staticprivate PathFinder.FilterfilterThe filter to be passed before a path is returned bynext().private Pathnext
-
Constructor Summary
Constructors Constructor Description Secondary(PathFinder encl, PathFinder.Filter filter)Create a finder receiving a stream of paths fromencland passing them further vianext()if they pass the filterfilter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PathgetNext()booleanhasNext()Returns whether this PathFinder can emit another path.Pathnext()Returns the next path this finder can emit.protected voidupdateNext()-
Methods inherited from class eu.simuline.util.PathFinder
add, and, exec, execFilter, execJava, execJavaFilter, main, name, nameFilter, not, or, path, print
-
-
-
-
Field Detail
-
next
private Path next
-
encl
private final PathFinder encl
The source finder from which the stream of paths is read. **** this is superfluous if this is not static
-
filter
private final PathFinder.Filter filter
The filter to be passed before a path is returned bynext().
-
-
Constructor Detail
-
Secondary
Secondary(PathFinder encl, PathFinder.Filter filter)
Create a finder receiving a stream of paths fromencland passing them further vianext()if they pass the filterfilter.
-
-
Method Detail
-
updateNext
protected void updateNext()
-
hasNext
public boolean hasNext()
Description copied from class:PathFinderReturns whether this PathFinder can emit another path.- Specified by:
hasNextin classPathFinder- See Also:
PathFinder.next()
-
next
public Path next()
Description copied from class:PathFinderReturns the next path this finder can emit. This does not throw an exception iffPathFinder.hasNext()returns true.- Specified by:
nextin classPathFinder
-
getNext
protected Path getNext()
-
-