Package eu.simuline.util
Class Finder.OrFilter
- java.lang.Object
-
- eu.simuline.util.Finder.Filter
-
- eu.simuline.util.Finder.OrFilter
-
- Enclosing class:
- Finder
static class Finder.OrFilter extends Finder.Filter
One of the logical operations of filters: Returns a filter which passes a file 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 file, 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.
See
Finder.or(Filter[]).
-
-
Field Summary
Fields Modifier and Type Field Description private Finder.Filter[]filtersThis filter passes a file iff at least one of of these passes if invoked in the natural ordering.
-
Constructor Summary
Constructors Constructor Description OrFilter(Finder.Filter[] filters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanpass(File file)Returns for the given file whether this file passes this filter.-
Methods inherited from class eu.simuline.util.Finder.Filter
and, not, or
-
-
-
-
Field Detail
-
filters
private final Finder.Filter[] filters
This filter passes a file iff at least one of of these passes if invoked in the natural ordering.
-
-
Constructor Detail
-
OrFilter
OrFilter(Finder.Filter[] filters)
-
-
Method Detail
-
pass
public boolean pass(File file)
Description copied from class:Finder.FilterReturns for the given file whether this file passes this filter.- Specified by:
passin classFinder.Filter
-
-