List of utility methods to do Collection Join
String | join(Collection join return join(thisPath.toArray(new String[0]), _delim); |
String | join(Collection join return join(values, ","); |
String | join(Collection Join all element from words list and separate them with character if (words.isEmpty()) { return ""; StringBuilder wordList = new StringBuilder(); for (String word : words) { wordList.append(word).append(character); String s = new String(wordList.deleteCharAt(wordList.length() - character.length())); ... |
String | join(Collection Concatenates all elements in the given collection c into a single string with the separator if (c == null) return ""; int size = c.size(); if (size == 0) return ""; Iterator<T> it = c.iterator(); StringBuilder buf = new StringBuilder(); for (int i = 0; it.hasNext() && i < size - 1; i++) { ... |
String | join(Collection join if (coll == null) return null; StringBuilder sb = new StringBuilder(); boolean looped = false; for (T t : coll) { if (looped) sb.append(separator); sb.append(t.toString()); ... |
String | join(Collection Serialize collection elements with a delimiter. assertNotNull(delimiter); if (collec == null) return null; StringBuilder sb = new StringBuilder(); boolean first = true; for (T t : collec) { if (!first) { sb.append(","); ... |
String | join(Collection Joins the elements of the provided collection into a single String containing the provided list of elements. if (collection.isEmpty()) { return ""; StringBuilder stringBuilder = new StringBuilder(256); for (T t : collection) { stringBuilder.append(t.toString()).append(joinedBy); return stringBuilder.substring(0, stringBuilder.length() - joinedBy.length()); ... |
String | join(Collection Join a collection of items into a string. StringBuilder result = new StringBuilder(); boolean isFirst = true; for (final T elem : collection) { if (!isFirst) { result.append(joinString); } else { isFirst = false; result.append(elem.toString()); return result.toString(); |
String | join(Collection join String result = ""; if (!collections.isEmpty()) { StringBuilder stringBuilder = new StringBuilder(); for (T object : collections) { stringBuilder.append(object.toString()).append(separator); int resultLength = stringBuilder.length(); stringBuilder.delete(resultLength - separator.length(), resultLength); ... |
String | join(Collection join if (list == null) { return null; final StringBuilder buf = new StringBuilder(); for (T item : list) { if (buf.length() > 0) { buf.append(separator); if (item != null) { buf.append(item); return buf.toString(); |