code: public boolean trimToSizeIfGreaterThanPercent(double loadFactor)
      {
          double excessCapacity = 1.0 - (double) this.size / (double) this.items.length;
          if (excessCapacity > loadFactor)
          {
              this.trimToSize();
              return true;
          }
          return false;
      }
docs: Express load factor as 0.25 to trim a collection with more than 25% excess capacity