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

Method addAllImpl

output/java_guava/1.4.18/Multisets.java:896–909  ·  view source on GitHub ↗

An implementation of Multiset#addAll.

(Multiset<E> self, Collection<? extends E> elements)

Source from the content-addressed store, hash-verified

894 */
895
896 static <E> boolean addAllImpl(Multiset<E> self, Collection<? extends E> elements) {
897 if (elements.isEmpty()) {
898 return false;
899 }
900 if (elements instanceof Multiset) {
901 Multiset<? extends E> that = cast(elements);
902 for (Entry<? extends E> entry : that.entrySet()) {
903 self.add(entry.getElement(), entry.getCount());
904 }
905 } else {
906 Iterators.addAll(self, elements.iterator());
907 }
908 return true;
909 }
910
911 /**
912 * An implementation of {@link Multiset#removeAll}.

Callers 2

standardAddAllMethod · 0.95
addAllMethod · 0.95

Calls 8

castMethod · 0.95
addAllMethod · 0.95
isEmptyMethod · 0.65
entrySetMethod · 0.65
addMethod · 0.65
getElementMethod · 0.65
getCountMethod · 0.65
iteratorMethod · 0.65

Tested by

no test coverage detected