@Test public void testJoinWithFooIterator() { List<Foo> list = new ArrayList<Foo>(); Assert.assertEquals("", StringUtils.join(list.iterator(), "")); Assert.assertEquals("", StringUtils.join(list.iterator(), " ")); list.add(new Foo("")); Assert.assertEquals("", StringUtils.join(list.iterator(), "")); Assert.assertEquals("", StringUtils.join(list.iterator(), " ")); list.add(new Foo("foo")); Assert.assertEquals("foo", StringUtils.join(list.iterator(), "")); Assert.assertEquals(" foo", StringUtils.join(list.iterator(), " ")); list.add(new Foo("bar")); Assert.assertEquals("foobar", StringUtils.join(list.iterator(), "")); Assert.assertEquals(" foo bar", StringUtils.join(list.iterator(), " ")); }
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; }