List of utility methods to do Collection Print
String | prettyPrint(Collection> c) Iterates over a collection of objects and joins them together with ", " , for display purposes.
if (c == null || c.isEmpty()) { return ""; StringBuilder sb = new StringBuilder(); int size = c.size(); int i = 0; for (Object obj : c) { sb.append(obj); ... |
String | prettyPrint(Collection> input) Pretty print of a collection. if (input != null && !input.isEmpty()) { Iterator<?> it = input.iterator(); return concatinateElements(it); return ""; |
String | prettyPrint(Collection pretty Print String toString = allGroups.toString();
return toString.substring(1, toString.length() - 1);
|
String | prettyPrintCollection(Collection pretty Print Collection StringBuilder sb = new StringBuilder(collection.size()); for (T element : collection) { sb.append(element).append(COMMA); return sb.toString(); |
StringBuffer | prettyPrintListOfClasses(Collection pretty Print List Of Classes final StringBuffer listOfClasses = new StringBuffer(); for (String javaClassName : package1DependenciesOnPackage2) { listOfClasses.append("\t|\t"); listOfClasses.append(" |-- @ "); listOfClasses.append(javaClassName); listOfClasses.append("\n"); return listOfClasses; ... |
void | print(Collection c)System.out.println(dumpToString(c)); |
void | print(Collection c)if (isEmpty(c)) { return; for (Object object : c) { |
String | print(Collection collection, String delim)StringBuffer buffer = new StringBuffer(); print(buffer, collection, delim); return buffer.toString(); |
String | print(Collection> c, String separator)StringBuilder b = new StringBuilder(); if (c.size() <= 0) return ""; Iterator<?> i = c.iterator(); b.append(i.next().toString()); while (i.hasNext()) { b.append(separator); b.append(i.next().toString()); ... |
void | print(CollectionIterator<T> it = c.iterator();
while (it.hasNext()) {
System.out.println(it.next());
|