org.testng.collections.Lists Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng Show documentation
Show all versions of testng Show documentation
A testing framework for the JVM
package org.testng.collections;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
public final class Lists {
private Lists() {}
public static List newArrayList() {
return new ArrayList<>();
}
public static List newLinkedList() {
return new LinkedList<>();
}
public static List newLinkedList(Collection c) {
return new LinkedList<>(c);
}
public static List newArrayList(Collection c) {
return new ArrayList<>(c);
}
public static List newArrayList(K... elements) {
List result = new ArrayList<>();
Collections.addAll(result, elements);
return result;
}
public static List newArrayList(int size) {
return new ArrayList<>(size);
}
}