public static String asTokenSeparatedValues ( String token , Collection < String > strings ) { StringBuilder newString = new StringBuilder ( ) ; boolean first = true ; for ( String str : strings ) { if ( ! first ) { newString . append ( token ) ; } first = false ; newString . append ( str ) ; } return newString . toString ( ) ; }
This method converts a collection of strings to a token separated list of strings