1package org.testng.collections; 2 3import java.util.ArrayList; 4import java.util.Collection; 5import java.util.Collections; 6import java.util.List; 7 8public final class Lists { 9 10 private Lists() {} 11 12 public static <K> List<K> newArrayList() { 13 return new ArrayList<>(); 14 } 15 16 public static <K> List<K> newArrayList(Collection<K> c) { 17 return new ArrayList<>(c); 18 } 19 20 public static <K> List<K> newArrayList(K... elements) { 21 List<K> result = new ArrayList<>(); 22 Collections.addAll(result, elements); 23 return result; 24 } 25 26 public static <K> List<K> newArrayList(int size) { 27 return new ArrayList<>(size); 28 } 29} 30