MCPcopy Create free account
hub / github.com/antlr/codebuff / indexOf

Method indexOf

output/java_guava/1.4.17/Iterables.java:723–725  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

721
722
723 public static <T> int indexOf(Iterable<T> iterable, Predicate<? super T> predicate) {
724 return Iterators.indexOf(iterable.iterator(), predicate);
725 }
726
727 /**
728 * Returns a view containing the result of applying {@code function} to each

Callers

nothing calls this directly

Calls 2

indexOfMethod · 0.95
iteratorMethod · 0.65

Tested by

no test coverage detected