android/guava/src/com/google/common/collect/Lists.java
@GwtCompatible(serializable = true)
  public static <E> ArrayList<E> newArrayListWithCapacity(int initialArraySize) {
    checkNonnegative(initialArraySize, "initialArraySize"); // for GWT.
    return new ArrayList<>(initialArraySize);
  }
@GwtCompatible(serializable = true)
  public static <E> ArrayList<E> newArrayListWithCapacity(int initialArraySize) {
    checkNonnegative(initialArraySize, "initialArraySize"); // for GWT.
    return new ArrayList<>(initialArraySize);
  }
Creates an {@code ArrayList} instance backed by an array with the specified initial size;
simply delegates to {@link ArrayList#ArrayList(int)}.

<p><b>Note for Java 7 and later:</b> this method is now unnecessary and should be treated as
deprecated. Instead, use {@code new }{@link ArrayList#ArrayList(int) ArrayList}{@code <>(int)}
directly, taking advantage of the new <a href="http://goo.gl/iz2Wi">"diamond" syntax</a>.
(Unlike here, there is no risk of overload ambiguity, since the {@code ArrayList} constructors
very wisely did not accept varargs.)

@param initialArraySize the exact size of the initial backing array for the returned array list
({@code ArrayList} documentation calls this value the "capacity")
@return a new, empty {@code ArrayList} which is guaranteed not to resize itself unless its size
reaches {@code initialArraySize + 1}
@throws IllegalArgumentException if {@code initialArraySize} is negative