Class ClearableIntObjectHashMap<VType>

java.lang.Object
com.carrotsearch.hppc.IntObjectHashMap<VType>
org.antlr.v4.runtime.atn.ClearableIntObjectHashMap<VType>
Type Parameters:
VType - value type
All Implemented Interfaces:
com.carrotsearch.hppc.Accountable, com.carrotsearch.hppc.IntObjectAssociativeContainer<VType>, com.carrotsearch.hppc.IntObjectMap<VType>, com.carrotsearch.hppc.Preallocable, Cloneable, Iterable<com.carrotsearch.hppc.cursors.IntObjectCursor<VType>>

final class ClearableIntObjectHashMap<VType> extends com.carrotsearch.hppc.IntObjectHashMap<VType>
Package-private int → V map with O(1) empty clear().

API boundary: Package-private only — used as a private field on ParserATNSimulator for the retained precedence-filter alt-1 index. Never appears in any public or protected signature. Extends HPPC so hot put/get stay monomorphic without a wrapper frame; HPPC is not part of the published API.

HPPC's stock IntObjectHashMap.clear() always bulk-fills the table. Retained scratch clears every filter invocation; empty clear is a no-op.

  • Nested Class Summary

    Nested classes/interfaces inherited from class com.carrotsearch.hppc.IntObjectHashMap

    com.carrotsearch.hppc.IntObjectHashMap.KeysContainer
  • Field Summary

    Fields inherited from class com.carrotsearch.hppc.IntObjectHashMap

    assigned, hasEmptyKey, keyMixer, keys, loadFactor, mask, orderMixer, resizeAt, values
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ClearableIntObjectHashMap(int expectedElements)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears all entries.

    Methods inherited from class com.carrotsearch.hppc.IntObjectHashMap

    allocateBuffers, allocateThenInsertThenRehash, clone, containsKey, ensureCapacity, equalElements, equals, forEach, from, get, getOrDefault, hashCode, hashKey, indexExists, indexGet, indexInsert, indexOf, indexReplace, isEmpty, iterator, keys, put, putAll, putAll, putIfAbsent, ramBytesAllocated, ramBytesUsed, rehash, release, remove, removeAll, removeAll, removeAll, shiftConflictingKeys, size, toString, values, verifyLoadFactor, visualizeKeyDistribution

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Constructor Details

    • ClearableIntObjectHashMap

      ClearableIntObjectHashMap()
    • ClearableIntObjectHashMap

      ClearableIntObjectHashMap(int expectedElements)
      Parameters:
      expectedElements - capacity hint
  • Method Details

    • clear

      public void clear()
      Clears all entries. Already-empty maps return without touching backing arrays.
      Specified by:
      clear in interface com.carrotsearch.hppc.IntObjectMap<VType>
      Overrides:
      clear in class com.carrotsearch.hppc.IntObjectHashMap<VType>