Package eu.simuline.util
Class PathFinder.AndFilter
- java.lang.Object
-
- eu.simuline.util.PathFinder.Filter
-
- eu.simuline.util.PathFinder.AndFilter
-
- Enclosing class:
- PathFinder
static class PathFinder.AndFilter extends PathFinder.Filter
One of the logical operations of filters: Returns a filter which passes a path iff all original filters infiltersdo so.This is a lazy and-filter, i.e. if one of the filters rejects 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.
Maybe lazy and-filters are not so useful, because, unlike non-lazy and-filters and or-filters, they could be realized as a sequence of filters.
-
-
Field Summary
Fields Modifier and Type Field Description private PathFinder.Filter[]filtersThis filter passes a path iff all of these pass if invoked in the natural ordering.
-
Constructor Summary
Constructors Constructor Description AndFilter(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 all of these pass if invoked in the natural ordering.
-
-
Constructor Detail
-
AndFilter
AndFilter(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
-
-