Here you can find the source of copyList(List
public static List<String> copyList(List<String> list)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.Collections; import java.util.List; public class Main { public static List<String> copyList(List<String> list) { if (list == null) return Collections.emptyList(); List<String> result = new ArrayList<String>(list.size()); result.addAll(list);//from www. j a v a 2 s.com return Collections.unmodifiableList(result); } }