Here you can find the source of copyObjectList(List
Parameter | Description |
---|---|
List | of objects |
public static List<Object> copyObjectList(List<Object> objects)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { /**// ww w . j av a 2s. c om * Get a copy of a list of objects * @param List of objects * @return a copy list of objects */ public static List<Object> copyObjectList(List<Object> objects) { List<Object> answer = new ArrayList<Object>(); if (objects == null) return null; for (Object o : objects) { answer.add(o); } return answer; } }