Top Description Fields Constructors Methods
org.glassfish.hk2.utilities

public Class OrFilter

extends Object
implements Filter
Class Inheritance
All Implemented Interfaces
org.glassfish.hk2.api.Filter
Imports
java.util.ArrayList, org.glassfish.hk2.api.Descriptor, .Filter, .IndexedFilter, org.glassfish.hk2.utilities.general.GeneralUtilities

Creates a filter that matches if at least one of the sub-filters is a match. Respects the rules of IndexedFilter as well
Author
jwells

Field Summary

Modifier and TypeField and Description
private final ArrayList<Filter>

Constructor Summary

AccessConstructor and Description
public
OrFilter(Filter...
other filters to be considered in the Or expression
filters
)

Creates an OrFilter whose matches methods returns true if at least one of the filters given returns true.

Method Summary

Modifier and TypeMethod and Description
public boolean
matches(Descriptor d)

Implements org.glassfish.hk2.api.Filter.matches.

Returns true if this filter matches the given object

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allFiltersback to summary
private final ArrayList<Filter> allFilters

Constructor Detail

OrFilterback to summary
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:Filter[]

other filters to be considered in the Or expression

Method Detail

matchesback to summary
public boolean matches(Descriptor d)

Implements org.glassfish.hk2.api.Filter.matches.

Doc from org.glassfish.hk2.api.Filter.matches.

Returns true if this filter matches the given object

Annotations
@Override