Class OrFilter

java.lang.Object
org.glassfish.hk2.utilities.OrFilter
All Implemented Interfaces:
Filter

public class OrFilter extends Object implements Filter
Creates a filter that matches if at least one of the sub-filters is a match. Respects the rules of IndexedFilter as well
  • Field Details

  • Constructor Details

    • 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 Details

    • matches

      public boolean matches(Descriptor d)
      Description copied from interface: Filter
      Returns true if this filter matches the given object
      Specified by:
      matches in interface Filter
      Parameters:
      d - The object to match against this filter. May not be null
      Returns:
      true if this filter matches the object