@ThreadSafe public final class MapCompat extends Object
| Modifier and Type | Method and Description |
|---|---|
static <K,V> Map<K,V> |
newMap(int capacity)
Constructs a new Map initialized with
capacity. |
public static final <K,V> Map<K,V> newMap(int capacity)
capacity. This may return different
underlying map implementations depending on the platform version.
While the implementation of this method could change, the intention is to return
ArrayMap when possible, and HashMap otherwise.
K - Key type of the map.V - Value type of the map.capacity - Capacity of the map.