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

Method putAllImpl

Ports/CLDC11/src/java/util/HashMap.java:603–613  ·  view source on GitHub ↗
(Map<? extends K, ? extends V> map)

Source from the content-addressed store, hash-verified

601 }
602
603 private void putAllImpl(Map<? extends K, ? extends V> map) {
604 int capacity = elementCount + map.size();
605 if (capacity > threshold) {
606 rehash(capacity);
607 }
608 Iterator it = map.entrySet().iterator();
609 while (it.hasNext()) {
610 Map.Entry<? extends K, ? extends V> entry = (Map.Entry<? extends K, ? extends V>)it.next();
611 putImpl(entry.getKey(), entry.getValue());
612 }
613 }
614
615 void rehash(int capacity) {
616 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