Here you can find the source of collectionToStringList(Collection c)
Parameter | Description |
---|---|
c | collection |
public static List<String> collectionToStringList(Collection c)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { /**/*w ww .ja v a2 s. c o m*/ * Take a collection, return a list containing the string value of every * element in the collection. * * @param c collection * @return a stringified list */ public static List<String> collectionToStringList(Collection c) { List<String> l = new ArrayList<String>(c.size()); for (Object o : c) { l.add(o.toString()); } return l; } }