(Map<? extends K, ? extends V> map)
| 620 | } |
| 621 | |
| 622 | private void putAllImpl(Map<? extends K, ? extends V> map) { |
| 623 | int capacity = elementCount + map.size(); |
| 624 | if (capacity > threshold) { |
| 625 | rehash(capacity); |
| 626 | } |
| 627 | for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) { |
| 628 | putImpl(entry.getKey(), entry.getValue()); |
| 629 | } |
| 630 | } |
| 631 | |
| 632 | void rehash(int capacity) { |
| 633 | int length = calculateCapacity((capacity == 0 ? 1 : capacity << 1)); |