@Test public void testJoinWithObjectArray() { Assert.assertNull(StringUtils.join(null, ' ')); Assert.assertEquals(" ", StringUtils.join(new String[]{null, null}, ' ')); Assert.assertEquals("", StringUtils.join(new String[]{}, ' ')); Assert.assertEquals("", StringUtils.join(new String[]{""}, ' ')); Assert.assertEquals(" ", StringUtils.join(new String[]{"", ""}, ' ')); Assert.assertEquals(" ", StringUtils.join(new String[]{"", "", ""}, ' ')); Assert.assertEquals("foo bar buzz", StringUtils.join(new String[]{"foo", "bar", "buzz"}, ' ')); Assert.assertEquals("foo-bar-buzz", StringUtils.join(new String[]{"foo", "bar", "buzz"}, '-')); Assert.assertEquals("foo-bar-buzz", StringUtils.join(new Foo[]{new Foo("foo"), new Foo("bar"), new Foo("buzz")}, '-')); }
public static String join(Object[] array, char separator) { if (array == null) { return null; } return join(array, separator, 0, array.length); }
StringUtils { public static String join(Object[] array, char separator) { if (array == null) { return null; } return join(array, separator, 0, array.length); } }
StringUtils { public static String join(Object[] array, char separator) { if (array == null) { return null; } return join(array, separator, 0, array.length); } private  StringUtils(); }
StringUtils { public static String join(Object[] array, char separator) { if (array == null) { return null; } return join(array, separator, 0, array.length); } private  StringUtils(); static String byteToHex(byte[] data); static String replaceLineBreaksWithSpace(String string); static String collapseLineBreaks(String string); static String replaceLineBreaks(String string, String replace); static String removeWhiteSpaces(String string); static String tryTrim(String string); static int getLevenshteinDistance(CharSequence s, CharSequence t); static String join(Object[] array, char separator); static String join(Object[] array, char separator, int startIndex, int endIndex); static String join(Iterator<T> iterator, String separator); static String join(Collection<T> collection, String separator); }
StringUtils { public static String join(Object[] array, char separator) { if (array == null) { return null; } return join(array, separator, 0, array.length); } private  StringUtils(); static String byteToHex(byte[] data); static String replaceLineBreaksWithSpace(String string); static String collapseLineBreaks(String string); static String replaceLineBreaks(String string, String replace); static String removeWhiteSpaces(String string); static String tryTrim(String string); static int getLevenshteinDistance(CharSequence s, CharSequence t); static String join(Object[] array, char separator); static String join(Object[] array, char separator, int startIndex, int endIndex); static String join(Iterator<T> iterator, String separator); static String join(Collection<T> collection, String separator); static final String EMPTY; static final String SPACE; }