code: public void trimToSize() {
      if (needsAllocArrays()) {
        return;
      }
      int size = this.size;
      if (size < entries.length) {
        resizeEntries(size);
      }
      int minimumTableSize = Hashing.closedTableSize(size, LOAD_FACTOR);
      if (minimumTableSize < table.length) {
        resizeTable(minimumTableSize);
      }
    }
docs: Ensures that this {@code CompactHashSet} has the smallest representation in memory, given its
  current size.