List of utility methods to do List to String
String | toString(final Object[] list) Returns a readable presentation of an Object array. final StringBuffer buffer = new StringBuffer(30); buffer.append("("); if (list != null) { for (int i = 0; i < list.length; i++) { if (i > 0) { buffer.append(", "); if (list[i] instanceof CharSequence) { ... |
String | toString(List arguments) Takes a list and returns a space separated string with the string values of each list element. StringBuffer buffer = new StringBuffer(); for (Iterator iter = arguments.iterator(); iter.hasNext();) { String element = iter.next().toString(); buffer.append(element); if (iter.hasNext()) { buffer.append(' '); return buffer.toString(); |
String | toString(List l) to String StringBuffer buf = new StringBuffer(); for (int i = 0; i < l.size() - 1; i++) { buf.append(l.get(i).toString()); buf.append("\t"); buf.append(l.get(l.size() - 1).toString()); return buf.toString(); |
String | toString(List list) to String return Arrays.toString(list.toArray());
|
String | toString(List extends Object> list) Builds a string containing the names of each list element separated by comma. String result = ""; for (Iterator<? extends Object> it = list.iterator(); it.hasNext();) { Object obj = it.next(); if (it.hasNext()) { result += obj.toString() + ", "; } else { result += obj.toString(); return result; |
List | toString(List extends Object> objects) this method converts any List to a list of strings. List<String> strings = new ArrayList<String>(); for (Object object : objects) { strings.add(object.toString()); return strings; |
String | toString(List> col) to String StringBuilder buf = new StringBuilder(); buf.append("["); boolean first = true; for (Object o : col) { if (first) { first = false; } else { buf.append(", "); ... |
String | toString(List> coll, char delimiter) to String StringBuilder builder = new StringBuilder(); for (int i = 0; i < coll.size(); i++) { builder.append(coll.get(i)); if (i < coll.size() - 1) builder.append(delimiter); return builder.toString(); |
String | toString(List> list) to String if (list == null) { return "null"; String listStr = ""; for (Object obj : list) { listStr += obj.toString() + ", "; listStr = trimLastSeperator(listStr, ", "); ... |
String | toString(List> list) to String String s = ""; for (int i = 0; i < list.size(); i++) { if (i > 0) s += ", "; Object o = list.get(i); s += o.toString(); return s; ... |