@Test public void long_separator() { List<String> src = Arrays.asList("foo","bar","baz"); assertEquals("foo && bar && baz", Joiner.join(src, " && ")); }
public static String join(Iterable<String> src, String separator) { StringBuilder sb = new StringBuilder(); for (String s : src) { sb.append(s); sb.append(separator); } return sb.length() > 0 ? sb.substring(0, sb.length() - separator.length()) : ""; }
Joiner { public static String join(Iterable<String> src, String separator) { StringBuilder sb = new StringBuilder(); for (String s : src) { sb.append(s); sb.append(separator); } return sb.length() > 0 ? sb.substring(0, sb.length() - separator.length()) : ""; } }
Joiner { public static String join(Iterable<String> src, String separator) { StringBuilder sb = new StringBuilder(); for (String s : src) { sb.append(s); sb.append(separator); } return sb.length() > 0 ? sb.substring(0, sb.length() - separator.length()) : ""; }  }
Joiner { public static String join(Iterable<String> src, String separator) { StringBuilder sb = new StringBuilder(); for (String s : src) { sb.append(s); sb.append(separator); } return sb.length() > 0 ? sb.substring(0, sb.length() - separator.length()) : ""; }  static String join(Iterable<String> src, String separator); }
Joiner { public static String join(Iterable<String> src, String separator) { StringBuilder sb = new StringBuilder(); for (String s : src) { sb.append(s); sb.append(separator); } return sb.length() > 0 ? sb.substring(0, sb.length() - separator.length()) : ""; }  static String join(Iterable<String> src, String separator);  }