Class MapToolkit
- java.lang.Object
-
- org.openjdk.jmc.common.collection.MapToolkit
-
public class MapToolkit extends Object
Useful methods related to maps.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MapToolkit.IntEntry<K>
A map entry used to store integer values.
-
Constructor Summary
Constructors Constructor Description MapToolkit()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K> EntryHashMap<K,MapToolkit.IntEntry<K>>
createIntMap(int initialCapacity, float loadFactor)
Create a map for storing integers based on a given key type.
-
-
-
Method Detail
-
createIntMap
public static <K> EntryHashMap<K,MapToolkit.IntEntry<K>> createIntMap(int initialCapacity, float loadFactor)
Create a map for storing integers based on a given key type. Typically this is used to access and update integer values computed from or for the keys.- Type Parameters:
K
- the key type- Parameters:
initialCapacity
- initial storage capacityloadFactor
- load factor at which to increase the internal storage capacity- Returns:
- a map of integer entries
-
-