public static String join(Collection<?> col,String delim){
  if (UtilValidate.isEmpty(col))   return null;
  StringBuilder buf=new StringBuilder();
  Iterator<?> i=col.iterator();
  while (i.hasNext()) {
    buf.append(i.next());
    if (i.hasNext())     buf.append(delim);
  }
  return buf.toString();
}

public static String join ( Collection < ? > col , String delim ) { if ( UtilValidate . isEmpty ( col ) ) return null ; StringBuilder buf = new StringBuilder ( ) ; Iterator < ? > i = col . iterator ( ) ; while ( i . hasNext ( ) ) { buf . append ( i . next ( ) ) ; if ( i . hasNext ( ) ) buf . append ( delim ) ; } return buf . toString ( ) ; }
creates a single string from a collection of strings seperated by a delimiter .
