Java Utililty Methods List Create

List of utility methods to do List Create

Description

The list of methods to do List Create are organized into topic(s).

Method

ArrayListcreateList(T... array)
create List
ArrayList<T> list = new ArrayList<T>();
for (T t : array) {
    list.add(t);
return list;
ListcreateList(T... element)
Creates a new list and adds the element(s).
List<T> list = new ArrayList<T>();
fill(list, element);
return list;
ListcreateList(T... items)
create List
return Arrays.asList(items);
ListcreateList(T... items)
Create a new array list from the specified list of items.
List<T> result;
if (items != null && items.length > 0) {
    result = new ArrayList<T>(items.length);
    for (int i = 0; i < items.length; i++) {
        result.add(items[i]);
} else {
    result = Collections.emptyList();
...
ListcreateList(T... objs)
create List
List<T> list = new ArrayList<T>();
if (objs != null) {
    for (T t : objs) {
        list.add(t);
return list;
ArrayListcreateList(T... params)
create List
ArrayList<T> to = new ArrayList<T>();
to.addAll(Arrays.asList(params));
return to;
ArrayListcreateListFrom(String... array)
create List From
return new ArrayList<>(Arrays.asList(array));
ListcreateListFromCollection(Collection collection)
Creates an array of Integers from an Set of Integers
List list = new ArrayList();
if (collection != null) {
    list.addAll(collection);
return list;
java.util.ListcreateListFromCommaDelimitedString(String access)
return a ArrayList from comma-separated string
if (access == null || access.equals("")) {
    return null;
List<String> list = new ArrayList<String>();
String[] args = access.split(",");
for (String arg : args) {
    if (!arg.equals("")) {
        list.add(arg);
...
ListcreateListFromDotSeparatedString(String s)
create List From Dot Separated String
return Arrays.asList(s.split("\\."));