code: public static <T> T findAny( Stream<T> stream, Predicate<T> predicate ) {
          Optional<T> element = stream.filter(predicate).findAny();
          return element.orElse(null);
      }
docs: Find an element in the stream.
  
  @param stream the stream to check. This should be parallel.
  @param predicate the predicate to use.
  @return the element or null.