Java Utililty Methods List Print

List of utility methods to do List Print

Description

The list of methods to do List Print are organized into topic(s).

Method

StringprintTwoColumns(List left, List right, int leftWidth, int rightWidth, int sep)
print Two Columns
return printTwoColumns(left, right, leftWidth, rightWidth, sep, "");
StringprintValues(List values)
Print a list of values separated by commas.
StringBuilder sb = new StringBuilder();
if (values != null) {
    Iterator<String> iterator = values.iterator();
    while (iterator.hasNext()) {
        String value = iterator.next();
        sb.append(value);
        if (iterator.hasNext()) {
            sb.append(", ");
...
voidprintWithBars(int[] maxLength, String[] headings, List rows)
print With Bars
int nColumns = headings.length;
if (nColumns <= 0) {
    System.out.println("No rows");
} else {
    System.out.println(rows.size() + " rows returned");
    StringBuilder fb = new StringBuilder();
    StringBuilder bar = new StringBuilder();
    String gutter = "";
...