/** Creates a hash set with the given capacity and load factor. */ public KTypeHashSet(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)); }