code: private void trim(final int n) {
          if (n >= a.length || size == a.length) return;
          final char t[] = new char[Math.max(n, size)];
          System.arraycopy(a, 0, t, 0, size);
          a = t;
          //if (ASSERTS) assert size <= a.length;
      }
docs: Trims the backing array if it is too large.
  <br>
  If the current array length is smaller than or equal to <code>n</code>, this method does nothing. Otherwise, it trims the array length to the maximum between <code>n</code> and {@link #size()}.
  <br>This method is useful when reusing lists. {@linkplain #clear() Clearing a list} leaves the array length untouched. If you are reusing a list many times, you can call this method with a
  typical size to avoid keeping around a very large array just because of a few large transient lists.
  
  @param n the threshold for the trimming.