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 ; }
Take a collection return a list containing the string value of every element in the collection .