Class Int2IntHashMap


  • public class Int2IntHashMap
    extends Object
    A map<int, int> based on JCasHashMap, but without the multi-threading support This impl is for use in a single thread case only Supports shrinking (reallocating the big table) Implements Map - like interface: keys and values are ints Entry set not (yet) impl keys must be non-0; 0 is reserved to be an empty slot values can be anything, but 0 is the value returned by get if not found so values probably should not be 0
    • Constructor Detail

      • Int2IntHashMap

        public Int2IntHashMap()
      • Int2IntHashMap

        public Int2IntHashMap​(int initialCapacity)
    • Method Detail

      • clear

        public void clear()
      • get

        public int get​(int key)
      • containsKey

        public boolean containsKey​(int key)
      • isKeyValid

        public boolean isKeyValid​(int position)
      • put

        public int put​(int key,
                       int value)
      • putInner

        public void putInner​(int key,
                             int value)
      • size

        public int size()
      • getSortedKeys

        public int[] getSortedKeys()
      • showHistogram

        public void showHistogram()