public static String implode(Collection<String> items,String delimiter){
  Parameters.notNull("items",items);
  Parameters.notNull("delimiter",delimiter);
  if (items.isEmpty()) {
    return "";
  }
  StringBuilder buffer=new StringBuilder(200);
  boolean first=true;
  for (  String s : items) {
    if (!first) {
      buffer.append(delimiter);
    }
    buffer.append(s);
    first=false;
  }
  return buffer.toString();
}

public static String implode ( Collection < String > items , String delimiter ) { Parameters . notNull ( "items" , items ) ; Parameters . notNull ( "delimiter" , delimiter ) ; if ( items . isEmpty ( ) ) { return "" ; } StringBuilder buffer = new StringBuilder ( 200 ) ; boolean first = true ; for ( String s : items ) { if ( ! first ) { buffer . append ( delimiter ) ; } buffer . append ( s ) ; first = false ; } return buffer . toString ( ) ; }
implode collection of strings to one string using delimiter .
