index Of
Returns the index in this 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 -1 if there is no such index.
See also
Returns the index in this of the first element that satisfies the provided predicate, or -1 if the Iterator has no such elements.
More formally, returns the lowest index i such that predicate.apply(Iterators.get(iterator, i)) returns true, or -1 if there is no such index.
If -1 is returned, the iterator will be left exhausted: its hasNext method will return false. Otherwise, the iterator will be set to the element which satisfies the predicate.