Package eu.simuline.util
Class PathFinder.Filter
- java.lang.Object
-
- eu.simuline.util.PathFinder.Filter
-
- Direct Known Subclasses:
PathFinder.AndFilter,PathFinder.ExecFilter,PathFinder.ExecJavaFilter,PathFinder.NameFilter,PathFinder.NegFilter,PathFinder.OrFilter
- Enclosing class:
- PathFinder
abstract static class PathFinder.Filter extends Object
Represents a path filter.
-
-
Constructor Summary
Constructors Constructor Description Filter()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) static PathFinder.Filterand(PathFinder.Filter[] filters)Returns a filter which passes a path iff so do all filters infilters.(package private) PathFinder.Filternot()Returns a filter which passes a path ifffilterdoes not.(package private) static PathFinder.Filteror(PathFinder.Filter[] filters)Returns a filter which passes a path iff at least one filter infiltersdoes so.(package private) abstract booleanpass(Path path)Returns for the given path whether this path passes this filter.
-
-
-
Method Detail
-
pass
abstract boolean pass(Path path)
Returns for the given path whether this path passes this filter.
-
not
PathFinder.Filter not()
Returns a filter which passes a path ifffilterdoes not. This corresponds the tests\! expr1in the original find command.
-
and
static PathFinder.Filter and(PathFinder.Filter[] filters)
Returns a filter which passes a path iff so do all filters infilters. This corresponds the testsexpr1 -a .... exprnandexpr1 -and .... exprnin the original find command.- Parameters:
filters- a sequence of filters which may be empty. If empty, this filter passes all paths likePathFinder.TRUE.- Returns:
- a lazy and-filter of type
PathFinder.AndFilter. For more details see there.
-
or
static PathFinder.Filter or(PathFinder.Filter[] filters)
Returns a filter which passes a path iff at least one filter infiltersdoes so. This corresponds the testsexpr1 -o .... exprnandexpr1 -or .... exprnin the original find command.- Parameters:
filters- a sequence of filters which may be empty. If empty, this filter passes no path likePathFinder.FALSE.- Returns:
- a lazy and-filter of type
PathFinder.AndFilter. For more details see there.
-
-