Пример #1
0
  private Expression<K> copyWithoutTrue(And<K> input) {
    List<Expression<K>> copy = Lists.newArrayList();
    for (Expression<K> expr : input.expressions) {
      if (expr instanceof Literal) {
        Literal l = (Literal) expr;

        if (l.getValue()) {
          continue;
        }
      }
      copy.add(expr);
    }

    if (copy.isEmpty()) {
      return Literal.getTrue();
    }

    return And.of(copy);
  }