Class Int2ObjListMap<T>


  • public class Int2ObjListMap<T>
    extends java.lang.Object
    A map<int, T> based on ArrayList This impl is for use in a single thread case only Implements Map - like interface: keys are ints ≥ 0 values can be anything, but null is the value returned by get if not found so values probably should not be null remove not currently supported
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList<T> values  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      T get​(int key)  
      T put​(int key, T value)  
      • Methods inherited from class java.lang.Object

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

      • values

        private final java.util.ArrayList<T> values
    • Constructor Detail

      • Int2ObjListMap

        public Int2ObjListMap()
      • Int2ObjListMap

        public Int2ObjListMap​(int initialSize)
    • Method Detail

      • clear

        public void clear()
      • get

        public T get​(int key)
      • put

        public T put​(int key,
                     T value)