List of utility methods to do ArrayList Print
String | prettyPrintArrayList(ArrayList Makes an ArrayList of Strings pretty again! StringBuilder sb = new StringBuilder(); Iterator<String> i = input.iterator(); while (i.hasNext()) { String next = i.next(); sb.append(next); if (i.hasNext()) sb.append(", "); return sb.toString(); |
void | print(ArrayList array)System.out.println(array); |
void | print(ArrayList tokens)for (int i = 0; i < tokens.size(); i++) { System.out.print(tokens.get(i) + " "); System.out.print("\n"); |
void | print(ArrayList> tokens)for (int i = 0; i < tokens.size(); i++) { System.out.print(tokens.get(i) + " "); System.out.print("\n"); |
void | print(ArrayListString s = "["; for (int i = 0; i < l.size(); i++) { s += l.get(i); if (i < l.size() - 1) s += ", "; s += "]"; System.out.println(s); ... |
void | print(ArrayListfor (int i = 0; i < al[0].size(); i++) { System.out.print(al[0].get(i) + ":" + al[1].get(i) + " "); System.out.println("----------------------------------"); |
void | print(ArrayListfor (String line : lines) { if (targetColumn >= 0) System.out.println(line.split(",")[targetColumn]); else System.out.println(line); |
void | print(ArrayListfor (int i = 0; i < tokens.size(); i++) { System.out.print(tokens.get(i) + symbol); System.out.print("\n"); |
void | printArray(ArrayList print Array Iterator it = array.iterator();
while (it.hasNext()) {
System.out.println(it.next());
|
void | printArrayArray(ArrayList print Array Array for (int pos = 0; pos < matrix.size(); pos++) { ArrayList<Integer> list = matrix.get(pos); if (!list.isEmpty()) { String output = "pos = " + pos + ": ("; for (Integer i : list) { output = output + i + ","; System.out.println(output + ")"); ... |