- java.lang.Object
-
- org.apache.lucene.internal.hppc.HashContainers
-
class HashContainers extends java.lang.Object
Constants for primitive maps.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int
DEFAULT_EXPECTED_ELEMENTS
(package private) static float
DEFAULT_LOAD_FACTOR
(package private) static java.util.concurrent.atomic.AtomicInteger
ITERATION_SEED
(package private) static int
MAX_HASH_ARRAY_LENGTH
Maximum array size for hash containers (power-of-two and still allocable in Java, not a negative int).(package private) static float
MAX_LOAD_FACTOR
Maximum sane load factor (1 empty slot per 100).(package private) static int
MIN_HASH_ARRAY_LENGTH
Minimum hash buffer size.(package private) static float
MIN_LOAD_FACTOR
Minimal sane load factor (99 empty slots per 100).
-
Constructor Summary
Constructors Constructor Description HashContainers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static void
checkLoadFactor(double loadFactor, double minAllowedInclusive, double maxAllowedInclusive)
(package private) static boolean
checkPowerOfTwo(int arraySize)
(package private) static int
expandAtCount(int arraySize, double loadFactor)
(package private) static int
iterationIncrement(int seed)
(package private) static int
minBufferSize(int elements, double loadFactor)
(package private) static int
nextBufferSize(int arraySize, int elements, double loadFactor)
-
-
-
Field Detail
-
DEFAULT_EXPECTED_ELEMENTS
static final int DEFAULT_EXPECTED_ELEMENTS
- See Also:
- Constant Field Values
-
DEFAULT_LOAD_FACTOR
static final float DEFAULT_LOAD_FACTOR
- See Also:
- Constant Field Values
-
MIN_LOAD_FACTOR
static final float MIN_LOAD_FACTOR
Minimal sane load factor (99 empty slots per 100).- See Also:
- Constant Field Values
-
MAX_LOAD_FACTOR
static final float MAX_LOAD_FACTOR
Maximum sane load factor (1 empty slot per 100).- See Also:
- Constant Field Values
-
MIN_HASH_ARRAY_LENGTH
static final int MIN_HASH_ARRAY_LENGTH
Minimum hash buffer size.- See Also:
- Constant Field Values
-
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:
- Constant Field Values
-
ITERATION_SEED
static final java.util.concurrent.atomic.AtomicInteger ITERATION_SEED
-
-
Method Detail
-
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)
-
-