Class Int2IntArrayMapFixedSize


  • public class Int2IntArrayMapFixedSize
    extends java.lang.Object
    A map<int, int> based on having a key and value int array, where the keys are sorted Supports sharing a single key array with multiple value arrays Implements Map - like interface: keys and values are ints values can be anything except 0; 0 is the value returned by get if not found All adds must occur before any gets; then a sort must be called unless the adds are in sort order Threading: instances of this class may be accessed on multiple threads (different iterators may be on different threads)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int get​(int key, int[] sortedKeys)  
      int getAtIndex​(int index)  
      void putAtIndex​(int index, int value)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Int2IntArrayMapFixedSize

        public Int2IntArrayMapFixedSize​(int length)
    • Method Detail

      • get

        public int get​(int key,
                       int[] sortedKeys)
      • getAtIndex

        public int getAtIndex​(int index)
      • putAtIndex

        public void putAtIndex​(int index,
                               int value)