Returns an Optional containing the first element in iterable that satisfies the given predicate, if such an element exists. Warning: avoid using a predicate that matches null. If null is matched in iterable, a NullPointerException will be th
(Iterable<T> iterable, Predicate<? super T> predicate)
| 704 | |
| 705 | |
| 706 | public static <T> Optional<T> tryFind(Iterable<T> iterable, Predicate<? super T> predicate) { |
| 707 | return Iterators.tryFind(iterable.iterator(), predicate); |
| 708 | } |
| 709 | |
| 710 | /** |
| 711 | * Returns the index in {@code iterable} of the first element that satisfies |
no test coverage detected