611 |
|
|
612 |
|
/** |
613 |
|
* Creates a new, empty map with the specified initial capacity |
614 |
< |
* and load factor and with the default concurrencyLevel |
615 |
< |
* (<tt>16</tt>). |
614 |
> |
* and load factor and with the default concurrencyLevel (16). |
615 |
|
* |
616 |
|
* @param initialCapacity The implementation performs internal |
617 |
|
* sizing to accommodate this many elements. |
627 |
|
|
628 |
|
/** |
629 |
|
* Creates a new, empty map with the specified initial capacity, |
630 |
< |
* and with default load factor (<tt>0.75f</tt>) |
632 |
< |
* and concurrencyLevel (<tt>16</tt>). |
630 |
> |
* and with default load factor (0.75) and concurrencyLevel (16). |
631 |
|
* |
632 |
|
* @param initialCapacity the initial capacity. The implementation |
633 |
|
* performs internal sizing to accommodate this many elements. |
639 |
|
} |
640 |
|
|
641 |
|
/** |
642 |
< |
* Creates a new, empty map with a default initial capacity |
643 |
< |
* (<tt>16</tt>), load factor |
646 |
< |
* (<tt>0.75f</tt>), and concurrencyLevel |
647 |
< |
* (<tt>16</tt>). |
642 |
> |
* Creates a new, empty map with a default initial capacity (16), |
643 |
> |
* load factor (0.75) and concurrencyLevel (16). |
644 |
|
*/ |
645 |
|
public ConcurrentHashMap() { |
646 |
|
this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR, DEFAULT_CONCURRENCY_LEVEL); |
647 |
|
} |
648 |
|
|
649 |
|
/** |
650 |
< |
* Creates a new map with the same mappings as the given map. The |
651 |
< |
* map is created with a capacity of 1.5 times the number of |
652 |
< |
* mappings in the given map or <tt>16</tt> |
653 |
< |
* (whichever is greater), and a default load factor |
654 |
< |
* (<tt>0.75f</tt>) and concurrencyLevel |
659 |
< |
* (<tt>16</tt>). |
650 |
> |
* Creates a new map with the same mappings as the given map. |
651 |
> |
* The map is created with a capacity of 1.5 times the number |
652 |
> |
* of mappings in the given map or 16 (whichever is greater), |
653 |
> |
* and a default load factor (0.75) and concurrencyLevel (16). |
654 |
> |
* |
655 |
|
* @param m the map |
656 |
|
*/ |
657 |
|
public ConcurrentHashMap(Map<? extends K, ? extends V> m) { |