Package eu.simuline.util
Class PathFinder.OrFilter
- java.lang.Object
-
- eu.simuline.util.PathFinder.Filter
-
- eu.simuline.util.PathFinder.OrFilter
-
- Enclosing class:
- PathFinder
static class PathFinder.OrFilter extends PathFinder.Filter
One of the logical operations of filters: Returns a filter which passes a path iff at least one of the original filters infiltersdo so.This is a lazy or-filter, i.e. if one of the filters accepts the path, the filters later in the sequence are not executed any more. So the ordering has an effect, if one of the filters has a side effect. Ordering may also affect performance.
-
-
Field Summary
Fields Modifier and Type Field Description private PathFinder.Filter[]filtersThis filter passes a path iff at least one of of these passes if invoked in the natural ordering.
-
Constructor Summary
Constructors Constructor Description OrFilter(PathFinder.Filter[] filters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanpass(Path path)Returns for the given path whether this path passes this filter.-
Methods inherited from class eu.simuline.util.PathFinder.Filter
and, not, or
-
-
-
-
Field Detail
-
filters
private final PathFinder.Filter[] filters
This filter passes a path iff at least one of of these passes if invoked in the natural ordering.
-
-
Constructor Detail
-
OrFilter
OrFilter(PathFinder.Filter[] filters)
-
-
Method Detail
-
pass
public boolean pass(Path path)
Description copied from class:PathFinder.FilterReturns for the given path whether this path passes this filter.- Specified by:
passin classPathFinder.Filter
-
-