Returns an Optional containing the first element in this fluent iterable that satisfies the given predicate, if such an element exists. Warning: avoid using a predicate that matches null. If null is matched in this fluent iterable, a {@link NullPointerExcep
(Predicate<? super E> predicate)
| 468 | |
| 469 | |
| 470 | public final Optional<E> firstMatch(Predicate<? super E> predicate) { |
| 471 | return Iterables.tryFind(iterable, predicate); |
| 472 | } |
| 473 | |
| 474 | /** |
| 475 | * Returns a fluent iterable that applies {@code function} to each element of this fluent |