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

Method indexOf

corpus/java/training/guava/collect/Iterables.java:669–671  ·  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

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

Callers 2

getMethod · 0.45
countMethod · 0.45

Calls 2

indexOfMethod · 0.95
iteratorMethod · 0.65

Tested by

no test coverage detected