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

Method putAll

output/java_guava/1.4.19/AbstractMultimap.java:74–87  ·  view source on GitHub ↗
(@Nullable K key, Iterable<? extends V> values)

Source from the content-addressed store, hash-verified

72 }
73
74 @CanIgnoreReturnValue
75 @Override
76 public boolean putAll(@Nullable K key, Iterable<? extends V> values) {
77 checkNotNull(values);
78 // make sure we only call values.iterator() once
79 // and we only call get(key) if values is nonempty
80 if (values instanceof Collection) {
81 Collection<? extends V> valueCollection = (Collection<? extends V>) values;
82 return !valueCollection.isEmpty() && get(key).addAll(valueCollection);
83 } else {
84 Iterator<? extends V> valueItr = values.iterator();
85 return valueItr.hasNext() && Iterators.addAll(get(key), valueItr);
86 }
87 }
88
89 @CanIgnoreReturnValue
90 @Override

Callers 1

replaceValuesMethod · 0.95

Calls 11

addAllMethod · 0.95
putMethod · 0.95
isEmptyMethod · 0.65
addAllMethod · 0.65
getMethod · 0.65
iteratorMethod · 0.65
entriesMethod · 0.65
getKeyMethod · 0.65
getValueMethod · 0.65
checkNotNullMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected