public class TableLayoutBuilder extends java.lang.Object implements org.apache.commons.lang3.builder.Builder<TableLayout>
Construct a layout for a table.
| Constructor and Description |
|---|
TableLayoutBuilder() |
| Modifier and Type | Method and Description |
|---|---|
TableLayoutBuilder |
addColumn(java.lang.String name)
Add a column to the table layout.
|
TableLayoutBuilder |
addColumns(java.lang.Iterable<java.lang.String> columns)
Add columns to the layout.
|
TableLayoutBuilder |
addColumns(java.lang.String... columns)
Add columns to the layout.
|
TableLayout |
build() |
static TableLayoutBuilder |
copy(TableLayout layout)
Construct a new builder that is a copy of an existing layout.
|
int |
getColumnCount()
Get the number of columns currently in the layout.
|
public static TableLayoutBuilder copy(TableLayout layout)
Construct a new builder that is a copy of an existing layout.
layout - The layout to copy.public TableLayoutBuilder addColumn(java.lang.String name)
Add a column to the table layout. Each column must have a unique, non-null name.
name - The column name.java.lang.IllegalArgumentException - if the column already exists.public TableLayoutBuilder addColumns(java.lang.Iterable<java.lang.String> columns)
Add columns to the layout.
columns - The columns to add.public TableLayoutBuilder addColumns(java.lang.String... columns)
Add columns to the layout.
columns - The columns to add.public int getColumnCount()
Get the number of columns currently in the layout.
public TableLayout build()
build in interface org.apache.commons.lang3.builder.Builder<TableLayout>