Class HashContainers

java.lang.Object
org.apache.lucene.internal.hppc.HashContainers

class HashContainers extends Object
Constants for primitive maps.
  • Field Details

    • DEFAULT_EXPECTED_ELEMENTS

      static final int DEFAULT_EXPECTED_ELEMENTS
      See Also:
    • DEFAULT_LOAD_FACTOR

      static final float DEFAULT_LOAD_FACTOR
      See Also:
    • MIN_LOAD_FACTOR

      static final float MIN_LOAD_FACTOR
      Minimal sane load factor (99 empty slots per 100).
      See Also:
    • MAX_LOAD_FACTOR

      static final float MAX_LOAD_FACTOR
      Maximum sane load factor (1 empty slot per 100).
      See Also:
    • MIN_HASH_ARRAY_LENGTH

      static final int MIN_HASH_ARRAY_LENGTH
      Minimum hash buffer size.
      See Also:
    • MAX_HASH_ARRAY_LENGTH

      static final int MAX_HASH_ARRAY_LENGTH
      Maximum array size for hash containers (power-of-two and still allocable in Java, not a negative int).
      See Also:
    • ITERATION_SEED

      static final AtomicInteger ITERATION_SEED
  • Constructor Details

    • HashContainers

      HashContainers()
  • Method Details

    • iterationIncrement

      static int iterationIncrement(int seed)
    • nextBufferSize

      static int nextBufferSize(int arraySize, int elements, double loadFactor)
    • expandAtCount

      static int expandAtCount(int arraySize, double loadFactor)
    • checkPowerOfTwo

      static boolean checkPowerOfTwo(int arraySize)
    • minBufferSize

      static int minBufferSize(int elements, double loadFactor)
    • checkLoadFactor

      static void checkLoadFactor(double loadFactor, double minAllowedInclusive, double maxAllowedInclusive)