code: private boolean hasFilter(Filter filter, WhileMatchFilter whileMatchFilter) {
      if (filter == whileMatchFilter) {
        return true;
      }
  
      if (filter instanceof FilterList) {
        FilterList list = (FilterList) filter;
        for (Filter subFilter : list.getFilters()) {
          if (hasFilter(subFilter, whileMatchFilter)) {
            return true;
          }
        }
      }
  
      return false;
    }
docs: Return {@code true} iff {@code whileMatchFilter} is in {@code filter}.