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

Method all

output/java_guava/1.4.17/Iterators.java:688–697  ·  view source on GitHub ↗

Returns true if every element returned by iterator satisfies the given predicate. If iterator is empty, true is returned.

(Iterator<T> iterator, Predicate<? super T> predicate)

Source from the content-addressed store, hash-verified

686
687
688 public static <T> boolean all(Iterator<T> iterator, Predicate<? super T> predicate) {
689 checkNotNull(predicate);
690 while (iterator.hasNext()) {
691 T element = iterator.next();
692 if (!predicate.apply(element)) {
693 return false;
694 }
695 }
696 return true;
697 }
698
699 /**
700 * Returns the first element in {@code iterator} that satisfies the given

Callers 1

allMethod · 0.95

Calls 4

nextMethod · 0.65
applyMethod · 0.65
checkNotNullMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected