public static Predicate of(@Nonnull Iterable<? extends Predicate> predicates) {
    List<Predicate> predicateList = new LinkedList<>();

    // Simplify the predicate array
    for (Predicate predicate : predicates) {
      if (predicate instanceof AlwaysPredicate) {
        return predicate;
      }
      else if (predicate instanceof OrPredicate) {
        predicateList.addAll(Arrays.asList(((OrPredicate) predicate).getPredicates()));
      }
      else {
        predicateList.add(predicate);
      }
    }
    return predicateList.size() == 1 ?
        predicateList.get(0) :
        new OrPredicate(predicateList.toArray(new Predicate[predicateList.size()]));
  }
Predicate which evaluates to true if any of the predicates in a predicate
array evaluate to true.
ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/OrPredicate.java