Here you can find the source of toStringList(List list)
public static List toStringList(List list)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static List toStringList(List list) { List result = new ArrayList(list.size()); Object obj;/*from w w w. j av a 2s. co m*/ for (int i = 0; i < list.size(); i++) { obj = list.get(i); if (obj != null) { result.add(obj.toString()); } } return result; } }