@Test public void join() { try { StringUtils.join((Set<String>) null, null); } catch (NullPointerException e) { assertEquals("strings", e.getMessage()); } try { StringUtils.join((String[]) null, null); } catch (NullPointerException e) { assertEquals("strings", e.getMessage()); } try { StringUtils.join(new HashSet<String>(), null); } catch (NullPointerException e) { assertEquals("delimiter", e.getMessage()); } { String s = StringUtils.join(new String[0], "|"); assertEquals("", s); } { String s = StringUtils.join(new LinkedHashSet<String>(), "|"); assertEquals("", s); } { Set<String> strings = new LinkedHashSet<>(); strings.add("1"); strings.add("2"); strings.add("3"); assertEquals("1|2|3", StringUtils.join(strings, "|")); } }
public static String join(Collection<String> strings, String delimiter) { return join(strings, false, delimiter); }
StringUtils { public static String join(Collection<String> strings, String delimiter) { return join(strings, false, delimiter); } }
StringUtils { public static String join(Collection<String> strings, String delimiter) { return join(strings, false, delimiter); }  }
StringUtils { public static String join(Collection<String> strings, String delimiter) { return join(strings, false, delimiter); }  static boolean isReference(String name); static String encodeName(String string); static String encodeName(String string, char[] encode); static String encodeNameOld(String string, char[] encode); static String decodeName(String string); static String decodeNameOld(String string); static String join(Collection<String> strings, String delimiter); static String join(Collection<String> strings,
                              boolean encode, String delimiter); static String join(String[] strings, String delimiter); static String join(String[] strings,
                              boolean encode,
                              String delimiter); static String[] split(String string, boolean decode, String delimiter); static String camelCaseToDisplay(String camelCase); }
StringUtils { public static String join(Collection<String> strings, String delimiter) { return join(strings, false, delimiter); }  static boolean isReference(String name); static String encodeName(String string); static String encodeName(String string, char[] encode); static String encodeNameOld(String string, char[] encode); static String decodeName(String string); static String decodeNameOld(String string); static String join(Collection<String> strings, String delimiter); static String join(Collection<String> strings,
                              boolean encode, String delimiter); static String join(String[] strings, String delimiter); static String join(String[] strings,
                              boolean encode,
                              String delimiter); static String[] split(String string, boolean decode, String delimiter); static String camelCaseToDisplay(String camelCase);  }