question: public static < T > List < T > copyToArrayListWithExtraCapacity ( T [ ] elements , int extraCapacity ) { List < T > asList ; if ( elements != null ) { asList = new ArrayList < T > ( elements . length + extraCapacity ) ; asList . addAll ( Arrays . asList ( elements ) ) ; } else { asList = new ArrayList < T > ( extraCapacity ) ; } return asList ; }
target:  Produces an ArrayList for an array of elements where the list is pre-sized with extra capacity. The extra capacity does not change the size of the list, but does change the initial capacity of the list, thus making adds more efficient if the ultimate size can be estimated.