public final class AsciiTable extends Object
Provides the ability to generate a simple ASCII table, typically used on the command line. All data is provided as strings, with formatting the responsibility of the caller.
| Modifier and Type | Method and Description |
|---|---|
static String |
generate(List<String> headers,
List<AsciiTableAlignment> alignments,
List<? extends List<String>> cells)
Generates the ASCII table.
|
public static String generate(List<String> headers, List<AsciiTableAlignment> alignments, List<? extends List<String>> cells)
The caller specifies the headers for each column and the alignment to use, plus the list of lists representing the data. All data is provided as strings, with formatting the responsibility of the caller.
headers - the table headersalignments - the table alignments, must match the size of the headerscells - the table cells, outer list of rows, inner list of columnsIllegalArgumentException - if the number of columns specified is inconsistentCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.