/** * Creates a hash map with the given initial capacity, * load factor. * * @param loadFactor The load factor (greater than zero and smaller than 1). */ public ObjectIntHashMap(final int initialCapacity, final double loadFactor) { this.loadFactor = loadFactor; //take into account of the load factor to guarantee no reallocations before reaching initialCapacity. allocateBuffers(HashContainers.minBufferSize(initialCapacity, loadFactor)); }
final int[] oldValues = ((this.values)); allocateBuffers(HashContainers.nextBufferSize(this.keys.length, this.assigned, this.loadFactor));