public class ASCIITableReport
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EMPTY_CELL_MARKER |
| Modifier and Type | Method and Description |
|---|---|
ASCIITableReport |
addDataRow(java.lang.String... dataRow)
Adds data row to the report.
|
static ASCIITableReport |
builder() |
ASCIITableReport |
disableRowTitles()
Disables all row titles which are normally displayed on left-hand side of the table.
|
ASCIITableReport |
enableRowTitles()
Enables all row titles which were disabled with use of
disableRowTitles() method. |
java.lang.String |
getTable()
Gets report as ASCII table in the String.
|
void |
printTable()
Prints report as ASCII table to the standard output.
|
ASCIITableReport |
titledBy(java.lang.String rowTitle)
Title for the last data row defined by
addDataRow(String...) method. |
ASCIITableReport |
withTopHeaders(java.lang.String... headers)
Allows to define top columns headers.
|
public static final java.lang.String EMPTY_CELL_MARKER
public static ASCIITableReport builder()
public ASCIITableReport disableRowTitles()
public ASCIITableReport enableRowTitles()
disableRowTitles() method.public ASCIITableReport withTopHeaders(java.lang.String... headers)
builder.withTopHeaders("Foo", "Bar", "Baz")
headers - top column headers in form of varargs.public ASCIITableReport addDataRow(java.lang.String... dataRow)
titledBy(String) will be used as next in chain title for this row will be printed out as very first on
the left hand side.
builder.addDataRow("foo", "bar", "baz")
dataRow - data row in form of varargs.public ASCIITableReport titledBy(java.lang.String rowTitle)
addDataRow(String...) method. This method must be used right after
call to addDataRow(String...) to apply it to correct row.
builder.addDataRow("foo", "bar", "baz").titledBy("My Row")
rowTitle - title for the last defined data rowpublic void printTable()
public java.lang.String getTable()
Copyright © 2018 SAP SE. All Rights Reserved.