public static <T>String joinAnd(final String delimiter,final String lastDelimiter,final Collection<T> objs){
  if (objs == null || objs.isEmpty())   return "";
  final Iterator<T> iter=objs.iterator();
  final StringBuilder buffer=new StringBuilder();
  while (iter.hasNext()) {
    final T obj=iter.next();
    if (notEmpty(obj)) {
      if (buffer.length() != 0) {
        buffer.append(iter.hasNext() ? delimiter : lastDelimiter);
      }
      buffer.append(Strings.toString(obj));
    }
  }
  return buffer.toString();
}

public static < T > String joinAnd ( final String delimiter , final String lastDelimiter , final Collection < T > objs ) { if ( objs == null || objs . isEmpty ( ) ) return "" ; final Iterator < T > iter = objs . iterator ( ) ; final StringBuilder buffer = new StringBuilder ( ) ; while ( iter . hasNext ( ) ) { final T obj = iter . next ( ) ; if ( notEmpty ( obj ) ) { if ( buffer . length ( ) != 0 ) { buffer . append ( iter . hasNext ( ) ? delimiter : lastDelimiter ) ; } buffer . append ( Strings . toString ( obj ) ) ; } } return buffer . toString ( ) ; }
like join , but allows for a distinct final delimiter . for english sentences such as " alice , bob and charlie " use " , " and " and " as the delimiters .
