MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / putAllImpl

Method putAllImpl

vm/JavaAPI/src/java/util/HashMap.java:589–599  ·  view source on GitHub ↗
(Map<? extends K, ? extends V> map)

Source from the content-addressed store, hash-verified

587 }
588
589 private void putAllImpl(Map<? extends K, ? extends V> map) {
590 int capacity = elementCount + map.size();
591 if (capacity > threshold) {
592 rehash(capacity);
593 }
594 Iterator it = map.entrySet().iterator();
595 while (it.hasNext()) {
596 Map.Entry<? extends K, ? extends V> entry = (Map.Entry<? extends K, ? extends V>)it.next();
597 putImpl(entry.getKey(), entry.getValue());
598 }
599 }
600
601 void rehash(int capacity) {
602 int length = calculateCapacity((capacity == 0 ? 1 : capacity << 1));

Callers 2

HashMapMethod · 0.95
putAllMethod · 0.95

Calls 9

rehashMethod · 0.95
hasNextMethod · 0.95
nextMethod · 0.95
putImplMethod · 0.95
sizeMethod · 0.65
iteratorMethod · 0.65
entrySetMethod · 0.65
getKeyMethod · 0.65
getValueMethod · 0.65

Tested by

no test coverage detected