Java List Create createList(List list)

Here you can find the source of createList(List list)

Description

create List

License

Apache License

Declaration

public static <T> List<T> createList(List<T> list) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

import java.util.List;

public class Main {

    public static <T> List<T> createList(List<T> list) {
        if (list == null) {
            return null;
        }/*from  w w  w . ja  v  a2 s .  c o m*/
        List<T> result = new ArrayList<T>();
        for (int i = 0; i < list.size(); i++) {
            T t = list.get(i);
            result.add(t);
        }
        return result;
    }
}

Related

  1. createList(Collection collection)
  2. createList(Collection collection)
  3. createList(E initialElement)
  4. createList(final T object)
  5. createList(final T... elements)
  6. createList(Object... entries)
  7. createList(Object... objs)
  8. createList(Object[] values)
  9. createList(String s)