Package eu.simuline.util
Class Finder.ExecJavaFilter
- java.lang.Object
-
- eu.simuline.util.Finder.Filter
-
- eu.simuline.util.Finder.ExecJavaFilter
-
- Enclosing class:
- Finder
static class Finder.ExecJavaFilter extends Finder.Filter
Filter executing a java class implementingFinder.Callablewhich passes the file received if the methodFinder.Callable.call(File)succeeds according to its return code.- See Also:
Finder.exec(String[]),Finder.ExecFilter
-
-
Field Summary
Fields Modifier and Type Field Description private Finder.CallablecallableThe instance to be executed to decide whether a given file passes the filter invokingFinder.Callable.call(File).
-
Constructor Summary
Constructors Constructor Description ExecJavaFilter(Finder.Callable callable)Creates a java execution filter from the givenFinder.Callable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanpass(File file)The given file passes this filter, i.e. this method returnstrue, if so doescallable.-
Methods inherited from class eu.simuline.util.Finder.Filter
and, not, or
-
-
-
-
Field Detail
-
callable
private final Finder.Callable callable
The instance to be executed to decide whether a given file passes the filter invokingFinder.Callable.call(File). 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(Finder.Callable callable)
Creates a java execution filter from the givenFinder.Callable.- Parameters:
callable- The callable defining the filter.
-
-
Method Detail
-
pass
public boolean pass(File file)
The given file passes this filter, i.e. this method returnstrue, if so doescallable.- Specified by:
passin classFinder.Filter
-
-