Class Lookup<K,​V>


  • public class Lookup<K,​V>
    extends java.lang.Object
    Primitive hashmap with limited insertion capability. Provides cached arrays with all values.
    • Constructor Summary

      Constructors 
      Constructor Description
      Lookup​(java.lang.Class<V> clazz, java.util.function.Supplier<V> factory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V[] array()  
      V get​(K key)  
      V reserve​(K key)  
      • Methods inherited from class java.lang.Object

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

      • Lookup

        public Lookup​(java.lang.Class<V> clazz,
                      java.util.function.Supplier<V> factory)
    • Method Detail

      • get

        public V get​(K key)
      • reserve

        public V reserve​(K key)
      • array

        public V[] array()
        Returns:
        Cached map with the values. Should not be modified!