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)
| 652 | * @since 11.0 |
| 653 | */ |
| 654 | public static <T> Optional<T> tryFind(Iterable<T> iterable, Predicate<? super T> predicate) { |
| 655 | return Iterators.tryFind(iterable.iterator(), predicate); |
| 656 | } |
| 657 | |
| 658 | /** |
| 659 | * Returns the index in {@code iterable} of the first element that satisfies |
no test coverage detected