public static Optional<Predicate> anyOf(Collection<? extends Predicate> predicates) {
    return predicates != null && !predicates.isEmpty() ? Optional.of(OrPredicate.of(predicates)) : Optional.empty();
  }
Creates an {@link OrPredicate} of the given predicates if any.

@param predicates collection of predicates to be OR-ed
@return {@link Optional} of the {@code OrPredicate} if any predicates are given,
  otherwise an empty {@code Optional}
ambari-server/src/main/java/org/apache/ambari/server/controller/predicate/Predicates.java