public static <T> T find(Iterator<T> iterator, Predicate<? super T> predicate) {
    checkNotNull(iterator);
    checkNotNull(predicate);
    while (iterator.hasNext()) {
      T t = iterator.next();
      if (predicate.apply(t)) {
        return t;
      }
    }
    throw new NoSuchElementException();
  }
public static <T> T find(Iterator<T> iterator, Predicate<? super T> predicate) {
    checkNotNull(iterator);
    checkNotNull(predicate);
    while (iterator.hasNext()) {
      T t = iterator.next();
      if (predicate.apply(t)) {
        return t;
      }
    }
    throw new NoSuchElementException();
  }
public static < T > T find ( Iterator < T > iterator , Predicate < ? super T > predicate ) { checkNotNull ( iterator ) ; checkNotNull ( predicate ) ; while ( iterator . hasNext ( ) ) { T t = iterator . next ( ) ; if ( predicate . apply ( t ) ) { return t ; } } throw new NoSuchElementException ( ) ; }
Returns the first element in {@code iterator} that satisfies the given predicate; use this
method only when such an element is known to exist. If no such element is found, the iterator
will be left exhausted: its {@code hasNext()} method will return {@code false}. If it is
possible that <i>no</i> element will match, use {@link #tryFind} or {@link #find(Iterator,
Predicate, Object)} instead.

@throws NoSuchElementException if no element in {@code iterator} matches the given predicate
Returns the first element in { @code iterator } that satisfies the given predicate ; use this method only when such an element is known to exist . If no such element is found the iterator will be left exhausted : its { @code hasNext () } method will return { @code false } . If it is possible that <i > no< / i > element will match use { @link #tryFind } or { @link #find ( Iterator Predicate Object ) } instead .