public PredicateBuilderWithPredicate end() {
      if (outer == null) {
        throw new IllegalStateException("Unbalanced block - missing begin.");
      }
      outer.addPredicate(getPredicate());
      return outer.getPredicateBuilderWithPredicate();
    }
Allow for chaining of already constructed predicates
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java