private void putAllImpl(Map<? extends K, ? extends V> map) {
        if (resizingIntoElementData != null) {
            if (backgroundResizeComplete) {
                forceFinishResizing();
            }
        }
        int capacity = elementCount + map.size();
        if (capacity > threshold) {
            doResize(capacity);
        }
        for (Map.Entry<? extends K, ? extends V> entry : map.entrySet()) {
            putImpl(entry.getKey(), entry.getValue());
        }
    }