List of utility methods to do Collection to String
String | collectionToString(Collection> list) collection To String if (null == list) { return null; final StringBuilder sb = new StringBuilder(); for (final Object item : list) { if (null != item) { sb.append(item.toString()); return sb.toString(); |
String | collectionToString(Collection> list) collection To String if (list == null) return "null"; if (list.isEmpty()) return "<empty list>"; StringBuffer sb = new StringBuffer(); int i = 0; for (Object item : list) { sb.append(item.toString()); ... |
String | collectionToString(Collection collection To String StringBuilder sb = new StringBuilder(); collectionToString(sb, collection, prefix, "[", ",", "]"); return sb.toString(); |
String | collectionToString(Collection collection To String StringBuilder builder = new StringBuilder(); for (Object obj : collection) { builder.append(String.format("%s\n", obj.toString())); return builder.toString(); |
String | collectionToString(Collection Returns a collection of Strings as a comma-delimitted list of strings. if (collection == null || collection.isEmpty()) { return ""; StringBuilder buf = new StringBuilder(); String delim = ""; for (String element : collection) { buf.append(delim); buf.append(element); ... |
String | collectionToString(Collection Returns a collection of Strings as a comma-delimitted list of strings. if (collection == null || collection.isEmpty()) { return ""; StringBuilder buf = new StringBuilder(); String delim = ""; for (String element : collection) { buf.append(delim); buf.append(element); ... |
String | collectionToString(Collection Returns a collection of Strings as a comma-delimitted list of strings. if (collection == null || collection.isEmpty()) { return ""; StringBuilder buf = new StringBuilder(); String delim = ""; for (String element : collection) { buf.append(delim); buf.append(element); ... |
String | collectionToString(Collection collection To String StringBuilder sb = new StringBuilder(512); Iterator<T> iter = col.iterator(); while (iter.hasNext()) { sb.append(iter.next()); if (iter.hasNext()) { sb.append(sep); return sb.toString(); |
String | collectionToString(Collection collection To String StringBuilder sb = new StringBuilder(); sb.append('{'); boolean isFirstElement = true; for (T element : collection) { if (isFirstElement) { isFirstElement = false; } else { sb.append(','); ... |
String | collectionToString(Collection collection To String return collectionToString(list, ", "); |