Android examples for java.util:List
Clone the passed list
//package com.java2s; import java.util.ArrayList; import java.util.List; public class Main { /**/*from www . j av a 2s .co m*/ * Clone the passed list * * @return the cloned list */ public static <T extends Object> List<T> cloneList(List<T> list) { List<T> clone = new ArrayList<>(list.size()); for (T item : list) { clone.add(item); } return clone; } }