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

Method firstMatch

output/java_guava/1.4.17/FluentIterable.java:470–472  ·  view source on GitHub ↗

Returns an Optional containing the first element in this fluent iterable that satisfies the given predicate, if such an element exists. Warning: avoid using a predicate that matches null. If null is matched in this fluent iterable, a {@link NullPointerExcep

(Predicate<? super E> predicate)

Source from the content-addressed store, hash-verified

468
469
470 public final Optional<E> firstMatch(Predicate<? super E> predicate) {
471 return Iterables.tryFind(iterable, predicate);
472 }
473
474 /**
475 * Returns a fluent iterable that applies {@code function} to each element of this fluent

Callers

nothing calls this directly

Calls 1

tryFindMethod · 0.95

Tested by

no test coverage detected