Class FixedColumnLengthTableMaker
java.lang.Object
org.apache.pulsar.testclient.utils.FixedColumnLengthTableMaker
Light-weight utility for creating rows where each column has a fixed length in a command-line setting.
-
Field Summary
FieldsModifier and TypeFieldDescriptioncharCharacter to duplicate to make the bottom border.Format String to apply to decimal entries.intLength of table elements.The border to use to make the left side of the table.intThe amount of spacing to pad left of an element with.If not null, lengthFunction should give the length for the given column index.The border to use to make the right side of the table.intThe amount of spacing to pad right of an element with.The String to separate elements with.charCharacter to duplicate to make the top border. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
bottomBorder
public char bottomBorderCharacter to duplicate to make the bottom border. -
decimalFormatter
Format String to apply to decimal entries. If set to null, no special formatting is applied. -
elementLength
public int elementLengthLength of table elements. Elements whose String representations exceed this length are trimmed down to this length. -
leftBorder
The border to use to make the left side of the table. -
leftPadding
public int leftPaddingThe amount of spacing to pad left of an element with. -
rightBorder
The border to use to make the right side of the table. -
rightPadding
public int rightPaddingThe amount of spacing to pad right of an element with. -
separator
The String to separate elements with. -
topBorder
public char topBorderCharacter to duplicate to make the top border. -
lengthFunction
If not null, lengthFunction should give the length for the given column index.
-
-
Constructor Details
-
FixedColumnLengthTableMaker
public FixedColumnLengthTableMaker()
-
-
Method Details
-
make
Make a table using the specified settings.- Parameters:
rows- Rows to construct the table from.- Returns:
- A String version of the table.
-