static Combiner dnfAnd() {
    Combiner combiner = new Combiner() {
      @Override
      public Expression combine(Expression left, Expression right) {
        if (!(left instanceof Call)) {
          // regular and
          return and().combine(left, right);
        }

        Call root = (Call) left;
        if (root.operator() == Operators.OR) {
          // change right-most child
          // a.is(1)
          // .or()
          // .b.is(2).c.is(3)
          List<Expression> args = root.arguments().stream()
                  .limit(root.arguments().size() - 1) // skip last
                  .collect(Collectors.toList());
          Expression last = root.arguments().get(root.arguments().size() - 1);
          Expression newLast = combine(last, right);
          args.add(newLast);
          return Expressions.or(args);
        }

        // simple 2 arg AND call
        return and().combine(left, right);
      }
    };

    return nullSafe(combiner);
  }
Combines expression using <a href="https://en.wikipedia.org/wiki/Disjunctive_normal_form">DNF logic</a>
criteria/common/src/org/immutables/criteria/matcher/Combiner.java