Here you can find the source of copySafelyToObjectList(java.util.List> list)
public static java.util.List<Object> copySafelyToObjectList(java.util.List<?> list)
//package com.java2s; //License from project: Open Source License public class Main { public static java.util.List<Object> copySafelyToObjectList(java.util.List<?> list) { java.util.Iterator<?> it = list.iterator(); java.util.List<Object> castedCopy = new java.util.ArrayList<Object>(); while (it.hasNext()) { castedCopy.add(it.next());/*from w w w . j av a2 s. co m*/ } return castedCopy; } }