Class FixedColumnLengthTableMaker
- java.lang.Object
-
- org.apache.pulsar.testclient.utils.FixedColumnLengthTableMaker
-
public class FixedColumnLengthTableMaker extends java.lang.ObjectLight-weight utility for creating rows where each column has a fixed length in a command-line setting.
-
-
Field Summary
Fields Modifier and Type Field Description charbottomBorderCharacter to duplicate to make the bottom border.java.lang.StringdecimalFormatterFormat String to apply to decimal entries.intelementLengthLength of table elements.java.lang.StringleftBorderThe border to use to make the left side of the table.intleftPaddingThe amount of spacing to pad left of an element with.java.util.function.Function<java.lang.Integer,java.lang.Integer>lengthFunctionIf not null, lengthFunction should give the length for the given column index.java.lang.StringrightBorderThe border to use to make the right side of the table.intrightPaddingThe amount of spacing to pad right of an element with.java.lang.StringseparatorThe String to separate elements with.chartopBorderCharacter to duplicate to make the top border.
-
Constructor Summary
Constructors Constructor Description FixedColumnLengthTableMaker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringmake(java.lang.Object[][] rows)Make a table using the specified settings.
-
-
-
Field Detail
-
bottomBorder
public char bottomBorder
Character to duplicate to make the bottom border.
-
decimalFormatter
public java.lang.String decimalFormatter
Format String to apply to decimal entries. If set to null, no special formatting is applied.
-
elementLength
public int elementLength
Length of table elements. Elements whose String representations exceed this length are trimmed down to this length.
-
leftBorder
public java.lang.String leftBorder
The border to use to make the left side of the table.
-
leftPadding
public int leftPadding
The amount of spacing to pad left of an element with.
-
rightBorder
public java.lang.String rightBorder
The border to use to make the right side of the table.
-
rightPadding
public int rightPadding
The amount of spacing to pad right of an element with.
-
separator
public java.lang.String separator
The String to separate elements with.
-
topBorder
public char topBorder
Character to duplicate to make the top border.
-
lengthFunction
public java.util.function.Function<java.lang.Integer,java.lang.Integer> lengthFunction
If not null, lengthFunction should give the length for the given column index.
-
-