Package eu.simuline.util
Class PathFinder.ExecJavaFilter
- java.lang.Object
-
- eu.simuline.util.PathFinder.Filter
-
- eu.simuline.util.PathFinder.ExecJavaFilter
-
- Enclosing class:
- PathFinder
static class PathFinder.ExecJavaFilter extends PathFinder.Filter
Filter executing a java class implementingPathFinder.Callablewhich passes the path received if the methodPathFinder.Callable.call(Path)succeeds according to its return code.- See Also:
PathFinder.exec(String[]),PathFinder.ExecFilter
-
-
Field Summary
Fields Modifier and Type Field Description private PathFinder.CallablecallableThe instance to be executed to decide whether a given path passes the filter invokingPathFinder.Callable.call(Path).
-
Constructor Summary
Constructors Constructor Description ExecJavaFilter(PathFinder.Callable callable)Creates a java execution filter from the givenPathFinder.Callable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanpass(Path path)The given path passes this filter, i.e. this method returnstrue, if so doescallable.-
Methods inherited from class eu.simuline.util.PathFinder.Filter
and, not, or
-
-
-
-
Field Detail
-
callable
private final PathFinder.Callable callable
The instance to be executed to decide whether a given path passes the filter invokingPathFinder.Callable.call(Path). Besides filtering, other actions may be taken as side effect. Parameters are passed to the callable when creating the instance or later by a setter method, depending on the implementation.
-
-
Constructor Detail
-
ExecJavaFilter
ExecJavaFilter(PathFinder.Callable callable)
Creates a java execution filter from the givenPathFinder.Callable.- Parameters:
callable- The callable defining the filter.
-
-
Method Detail
-
pass
public boolean pass(Path path)
The given path passes this filter, i.e. this method returnstrue, if so doescallable.- Specified by:
passin classPathFinder.Filter
-
-