public class TableOutput extends Object
Constructor and Description |
---|
TableOutput() |
Modifier and Type | Method and Description |
---|---|
static List<Integer> |
computeMaxWidths(List<List<String>> rows)
Compute the size of the largest string of each column of the provided table
|
static List<Integer> |
computeMaxWidths(String[][] rows)
Compute the size of the largest string of each column of the provided table
|
static void |
formatOutput(List<List<String>> table,
int[] maxWidths,
boolean leftJustifiedRows,
Writer writer)
This method outputs the input data in a tabular format with wrapping of lines
|
static void |
formatOutput(List<List<String>> table,
List<Integer> maxWidths,
boolean leftJustifiedRows,
Writer writer)
This method outputs the input data in a tabular format with wrapping of lines
|
static void |
formatOutput(String[][] table,
int[] maxWidths,
boolean leftJustifiedRows,
Writer writer)
This method outputs the input data in a tabular format with wrapping of lines
|
static void |
formatOutput(String[][] table,
List<Integer> maxWidths,
boolean leftJustifiedRows,
Writer writer)
This method outputs the input data in a tabular format with wrapping of lines
|
static void |
formatUnwrappedOutput(List<List<String>> table,
boolean leftJustifiedRows,
Writer writer)
This method outputs the input data in a tabular format *without* wrapping of lines
|
public static void formatUnwrappedOutput(List<List<String>> table, boolean leftJustifiedRows, Writer writer) throws LiquibaseException
table
- 2-dimensional array of dataleftJustifiedRows
- If true then add "-" to format stringwriter
- Writer to use for outputLiquibaseException
public static void formatOutput(List<List<String>> table, List<Integer> maxWidths, boolean leftJustifiedRows, Writer writer) throws LiquibaseException
table
- 2-dimensional array of datamaxWidths
- Maximum widths of each column to control wrappingleftJustifiedRows
- If true then add "-" to format stringwriter
- Writer to use for outputLiquibaseException
public static void formatOutput(List<List<String>> table, int[] maxWidths, boolean leftJustifiedRows, Writer writer) throws LiquibaseException
table
- 2-dimensional array of datamaxWidths
- Maximum widths of each column to control wrappingleftJustifiedRows
- If true then add "-" to format stringwriter
- Writer to use for outputLiquibaseException
public static void formatOutput(String[][] table, int[] maxWidths, boolean leftJustifiedRows, Writer writer) throws LiquibaseException
table
- 2-dimensional array of datamaxWidths
- Maximum widths of each column to control wrappingleftJustifiedRows
- If true then add "-" to format stringwriter
- Writer to use for outputLiquibaseException
public static void formatOutput(String[][] table, List<Integer> maxWidths, boolean leftJustifiedRows, Writer writer) throws LiquibaseException
table
- 2-dimensional array of datamaxWidths
- Maximum widths of each column to control wrappingleftJustifiedRows
- If true then add "-" to format stringwriter
- Writer to use for outputLiquibaseException
public static List<Integer> computeMaxWidths(List<List<String>> rows)
rows
- the provided table to compute widths fromRuntimeException
- if rows is null or the column count is not the same for every rowpublic static List<Integer> computeMaxWidths(String[][] rows)
rows
- the provided table to compute widths fromRuntimeException
- if rows is null or the column count is not the same for every rowCopyright © 2023 Liquibase.org. All rights reserved.