private void checkDone() {
    if (done) {
      throw new IllegalStateException("Can't reuse a predicate builder.");
    }
  }
Allow for chaining of already constructed predicates
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java