All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.collections.Lists Maven / Gradle / Ivy

There is a newer version: 7.10.2
Show newest version
package org.testng.collections;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

public final class Lists {

  private Lists() {}

  public static  List newArrayList() {
    return new ArrayList<>();
  }

  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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy