Returns the index in iterable of the first element that satisfies the provided predicate, or -1 if the Iterable has no such elements. More formally, returns the lowest index i such that predicate.apply(Iterables.get(iterable, i)) returns true, or {
(Iterable<T> iterable, Predicate<? super T> predicate)
| 667 | * @since 2.0 |
| 668 | */ |
| 669 | public static <T> int indexOf(Iterable<T> iterable, Predicate<? super T> predicate) { |
| 670 | return Iterators.indexOf(iterable.iterator(), predicate); |
| 671 | } |
| 672 | |
| 673 | /** |
| 674 | * Returns a view containing the result of applying {@code function} to each |