Class MapToolkit


  • public class MapToolkit
    extends java.lang.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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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