Class MapToolkit


  • public class MapToolkit
    extends Object
    Useful methods related to maps.
    • Constructor Detail

      • MapToolkit

        public MapToolkit()
    • 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 capacity
        loadFactor - load factor at which to increase the internal storage capacity
        Returns:
        a map of integer entries