Package liquibase.util
Class TableOutput
java.lang.Object
liquibase.util.TableOutput
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncomputeMaxWidths(String[][] rows) Compute the size of the largest string of each column of the provided tablecomputeMaxWidths(List<List<String>> rows) Compute the size of the largest string of each column of the provided tablestatic voidformatOutput(String[][] table, int[] maxWidths, boolean leftJustifiedRows, Writer writer) This method outputs the input data in a tabular format with wrapping of linesstatic voidformatOutput(String[][] table, List<Integer> maxWidths, boolean leftJustifiedRows, Writer writer) This method outputs the input data in a tabular format with wrapping of linesstatic voidformatOutput(List<List<String>> table, int[] maxWidths, boolean leftJustifiedRows, Writer writer) This method outputs the input data in a tabular format with wrapping of linesstatic voidformatOutput(List<List<String>> table, List<Integer> maxWidths, boolean leftJustifiedRows, Writer writer) This method outputs the input data in a tabular format with wrapping of linesstatic voidformatUnwrappedOutput(List<List<String>> table, boolean leftJustifiedRows, Writer writer) This method outputs the input data in a tabular format *without* wrapping of lines
-
Constructor Details
-
TableOutput
public TableOutput()
-
-
Method Details
-
formatUnwrappedOutput
public static void formatUnwrappedOutput(List<List<String>> table, boolean leftJustifiedRows, Writer writer) throws LiquibaseException This method outputs the input data in a tabular format *without* wrapping of lines- Parameters:
table- 2-dimensional array of dataleftJustifiedRows- If true then add "-" to format stringwriter- Writer to use for output- Throws:
LiquibaseException
-
formatOutput
public static void formatOutput(List<List<String>> table, List<Integer> maxWidths, boolean leftJustifiedRows, Writer writer) throws LiquibaseException This method outputs the input data in a tabular format with wrapping of lines- Parameters:
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 output- Throws:
LiquibaseException
-
formatOutput
public static void formatOutput(List<List<String>> table, int[] maxWidths, boolean leftJustifiedRows, Writer writer) throws LiquibaseException This method outputs the input data in a tabular format with wrapping of lines- Parameters:
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 output- Throws:
LiquibaseException
-
formatOutput
public static void formatOutput(String[][] table, int[] maxWidths, boolean leftJustifiedRows, Writer writer) throws LiquibaseException This method outputs the input data in a tabular format with wrapping of lines- Parameters:
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 output- Throws:
LiquibaseException
-
formatOutput
public static void formatOutput(String[][] table, List<Integer> maxWidths, boolean leftJustifiedRows, Writer writer) throws LiquibaseException This method outputs the input data in a tabular format with wrapping of lines- Parameters:
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 output- Throws:
LiquibaseException
-
computeMaxWidths
Compute the size of the largest string of each column of the provided table- Parameters:
rows- the provided table to compute widths from- Returns:
- an empty immutable list if the provided table is empty
- Throws:
RuntimeException- if rows is null or the column count is not the same for every row
-
computeMaxWidths
Compute the size of the largest string of each column of the provided table- Parameters:
rows- the provided table to compute widths from- Returns:
- an empty immutable list if the provided table is empty
- Throws:
RuntimeException- if rows is null or the column count is not the same for every row
-