code: void reduce() {
          // Note that the scanner choice is opposite of our type. This is
          // because a group of 'and's has children which are 'or's and vice
          // versa.
          Scanner<S> scanner = mForAnd ? OrChildScanner.THE : AndChildScanner.THE;
  
          Iterator<Filter<S>> it = mElements.iterator();
          aLoop:
          while (it.hasNext()) {
              Filter<S> a = it.next();
              for (Filter<S> b : mElements) {
                  if (a != b) {
                      if (a.accept(scanner, b)) {
                          it.remove();
                          continue aLoop;
                      }
                  }
              }
          }
      }
docs: Reduce the group set by eliminating redundant elements. These
  transformations applied are:
  
  ((a & b) | b) => b
  ((a | b) & b) => b