android/guava/src/com/google/common/collect/Iterables.java
public static <T> int indexOf(Iterable<T> iterable, Predicate<? super T> predicate) {
    return Iterators.indexOf(iterable.iterator(), predicate);
  }
public static <T> int indexOf(Iterable<T> iterable, Predicate<? super T> predicate) {
    return Iterators.indexOf(iterable.iterator(), predicate);
  }
Returns the index in {@code iterable} of the first element that satisfies the provided {@code
predicate}, or {@code -1} if the Iterable has no such elements.

<p>More formally, returns the lowest index {@code i} such that {@code
predicate.apply(Iterables.get(iterable, i))} returns {@code true}, or {@code -1} if there is no
such index.

@since 2.0