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

Method addAll

corpus/java/training/guava/collect/Iterables.java:358–365  ·  view source on GitHub ↗

Adds all elements in iterable to collection. @return true if collection was modified as a result of this operation.

(Collection<T> addTo, Iterable<? extends T> elementsToAdd)

Source from the content-addressed store, hash-verified

356 * operation.
357 */
358 @CanIgnoreReturnValue
359 public static <T> boolean addAll(Collection<T> addTo, Iterable<? extends T> elementsToAdd) {
360 if (elementsToAdd instanceof Collection) {
361 Collection<? extends T> c = Collections2.cast(elementsToAdd);
362 return addTo.addAll(c);
363 }
364 return Iterators.addAll(addTo, checkNotNull(elementsToAdd).iterator());
365 }
366
367 /**
368 * Returns the number of elements in the specified iterable that equal the

Callers 15

createMethod · 0.95
copyOfMethod · 0.95
createMethod · 0.95
newArrayDequeMethod · 0.95
newPriorityQueueMethod · 0.95
createMethod · 0.95
createMethod · 0.95
newLinkedListMethod · 0.95

Calls 5

castMethod · 0.95
addAllMethod · 0.95
addAllMethod · 0.65
iteratorMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected