List of utility methods to do List Print
void | printIndex(final Map print Index index.entrySet().forEach( e -> System.out.println("Class '" + e.getKey() + "' has following subclasses: " + e.getValue())); |
void | printIntegerArrayList(ArrayList print Integer Array List for (int i = 1; i <= arr.size(); i++) { System.out.print(Arrays.toString(arr.get(i - 1)) + " "); if (i % 10 == 0) { System.out.println(); |
void | printIntegerList(List print Integer List System.out.print("["); int i = 0; for (Integer integer : array) { System.out.print(integer); if (i != array.size() - 1) { System.out.print(", "); } else { System.out.println("]"); ... |
void | printItemList(String label, List print Item List System.out.print("\t" + label); int itemCount = 0; if (itemList == null) { System.out.print("\t[null]"); } else { for (String item : itemList) { if (itemCount == 0) { System.out.print("\t["); ... |
void | printLines(List Print the output lines for (String s : lines) {
System.out.println(s);
|
String | printLinkedList(String prefix, LinkedList> list) print Linked List StringBuilder sb = new StringBuilder(); Iterator<?> it = list.iterator(); sb.append(prefix).append(" ["); while (it.hasNext()) { sb.append(it.next().toString()); sb.append("]"); return sb.toString(); ... |
StringBuffer | printList(Collection Escapes the items of the Collection and returns them in a StringBuffer, separated by commas. StringBuffer sb = new StringBuffer(); if (list != null && list.size() > 0) { Iterator<String> iter = list.iterator(); while (true) { sb.append(escape(iter.next())); if (iter.hasNext()) { sb.append(", "); } else { ... |
void | printList(final List list) print List for (Iterator it = list.iterator(); it.hasNext();) { final Object o = it.next(); System.out.println("{List} " + o); |
String | printList(List l) print List Iterator i = l.iterator(); if (!i.hasNext()) return "[]"; StringBuilder sb = new StringBuilder(); sb.append("[\n"); for (;;) { Object e = i.next(); sb.append(e == l ? "(this Collection)" : e); ... |
void | printList(List l) print List String print = "Size is " + l.size() + ": "; for (int i = 0; i < l.size(); i++) { print += l.get(i).toString() + ", "; System.out.println(print); |