Class CharObjectHashMap<V>

  • Type Parameters:
    V - The value type stored in the map.
    All Implemented Interfaces:
    CharObjectMap<V>, Map<Character,​V>
    Direct Known Subclasses:
    Http2Settings

    public class CharObjectHashMap<V>
    extends Object
    implements CharObjectMap<V>
    A hash map implementation of CharObjectMap that uses open addressing for keys. To minimize the memory footprint, this class uses open addressing rather than chaining. Collisions are resolved using linear probing. Deletions implement compaction, so cost of remove can approach O(N) for full maps, which makes a small loadFactor recommended.
    • Field Detail

      • DEFAULT_CAPACITY

        public static final int DEFAULT_CAPACITY
        Default initial capacity. Used if not specified in the constructor
        See Also:
        Constant Field Values
      • DEFAULT_LOAD_FACTOR

        public static final float DEFAULT_LOAD_FACTOR
        Default load factor. Used if not specified in the constructor
        See Also:
        Constant Field Values
    • Constructor Detail

      • CharObjectHashMap

        public CharObjectHashMap()
      • CharObjectHashMap

        public CharObjectHashMap​(int initialCapacity)
      • CharObjectHashMap

        public CharObjectHashMap​(int initialCapacity,
                                 float loadFactor)