Package org.glassfish.hk2.utilities
Class OrFilter
- java.lang.Object
-
- org.glassfish.hk2.utilities.OrFilter
-
- All Implemented Interfaces:
Filter
public class OrFilter extends java.lang.Object implements Filter
Creates a filter that matches if at least one of the sub-filters is a match. Respects the rules ofIndexedFilter
as well
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<Filter>
allFilters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
matches(Descriptor d)
Returns true if this filter matches the given object
-
-
-
Field Detail
-
allFilters
private final java.util.ArrayList<Filter> allFilters
-
-
Constructor Detail
-
OrFilter
public OrFilter(Filter... filters)
Creates an OrFilter whose matches methods returns true if at least one of the filters given returns true. If filters is zero length then the matches method will always return false because none of the filters returned true!- Parameters:
filters
- other filters to be considered in the Or expression
-
-
Method Detail
-
matches
public boolean matches(Descriptor d)
Description copied from interface:Filter
Returns true if this filter matches the given object
-
-