public void putAll(Map<? extends K, ? extends V> map) {
        int size = map.size();
        if (size == 0)
            return;

        if (size > threshold) {
            if (size > MAXIMUM_CAPACITY)
                size = MAXIMUM_CAPACITY;

            int length = table.length;
            while (length < size) length <<= 1;

            resize(length);
        }

        for (Map.Entry<? extends K, ? extends V> e : map.entrySet())
            put(e.getKey(), e.getValue());
    }