code: public boolean trim() {
          final int l = arraySize(size, f);
          if (l >= n || size > maxFill(l, f)) return true;
          try {
              rehash(l);
          } catch (Error cantDoIt) {
              return false;
          }
          return true;
      }
docs: Rehashes the map, making the table as small as possible.
  <br>This method rehashes the table to the smallest size satisfying the load factor. It can be used when the set will not be changed anymore, so to optimize access speed and size.
  <br>If the table size is already the minimum possible, this method does nothing.
  
  @return true if there was enough memory to trim the map.
  @see #trim(int)