code: @Override
    public void ensureCapacity(int expectedElements) {
      if (expectedElements > resizeAt || keys == null) {
        final KType[] prevKeys = Intrinsics.<KType[]> cast(this.keys);
        allocateBuffers(minBufferSize(expectedElements, loadFactor));
        if (prevKeys != null && !isEmpty()) {
          rehash(prevKeys);
        }
      }
    }
docs: Ensure this container can hold at least the
  given number of elements without resizing its buffers.
  
  @param expectedElements The total number of elements, inclusive.