MCPcopy Index your code
hub / github.com/antlr/codebuff / addAll

Method addAll

output/java_guava/1.4.17/Iterators.java:378–387  ·  view source on GitHub ↗

Adds all elements in iterator to collection. The iterator will be left exhausted: its hasNext() method will return false. @return true if collection was modified as a result of this operation

(Collection<T> addTo, Iterator<? extends T> iterator)

Source from the content-addressed store, hash-verified

376 */
377
378 @CanIgnoreReturnValue
379 public static <T> boolean addAll(Collection<T> addTo, Iterator<? extends T> iterator) {
380 checkNotNull(addTo);
381 checkNotNull(iterator);
382 boolean wasModified = false;
383 while (iterator.hasNext()) {
384 wasModified |= addTo.add(iterator.next());
385 }
386 return wasModified;
387 }
388
389 /**
390 * Returns the number of elements in the specified iterator that equal the

Callers 12

snapshotMethod · 0.95
copyOfMethod · 0.95
addAllMethod · 0.95
newArrayListMethod · 0.95
addAllImplMethod · 0.95
toArrayListMethod · 0.95
putAllMethod · 0.95
immutableEnumSetMethod · 0.95
newHashSetMethod · 0.95
toArrayListMethod · 0.95
standardAddAllMethod · 0.95
toArrayListMethod · 0.95

Calls 4

addMethod · 0.65
nextMethod · 0.65
checkNotNullMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected