public final class ColumnsBuilder
extends java.lang.Object
Columns instance.| Constructor and Description |
|---|
ColumnsBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ColumnsBuilder |
addColumn(Column<?> column)
Equal to the
addColumn(Column, int) with current number of columns specified as index,
so new column will be added at the end of the list. |
ColumnsBuilder |
addColumn(Column<?> column,
int idx)
Add specified column at the specified in the list.
|
<T> ColumnsBuilder |
addColumn(ColumnKey<T> key,
java.util.Collection<T> data)
Equal to the
addColumn(Column) with a new Column instance being created
using specified key and data. |
<T> ColumnsBuilder |
addColumn(ColumnKey<T> key,
T... data)
Equal to the
addColumn(ColumnKey, Collection) with the specified data
wrapped into Arrays.asList(Object...) |
Columns |
build()
Builder new
Columns instance, using result of the getColumns() method as input data. |
<T> Column<T> |
getColumn(ColumnKey<T> key)
Returns a column with the same key as specified, or
null. |
java.util.List<Column<?>> |
getColumns() |
boolean |
isPresent(ColumnKey<?> key) |
<T> Column<T> |
removeColumn(ColumnKey<T> key)
Removes column with the specified key from the list.
|
java.lang.String |
toString() |
public boolean isPresent(ColumnKey<?> key)
public <T> Column<T> getColumn(ColumnKey<T> key)
null.public java.util.List<Column<?>> getColumns()
public <T> ColumnsBuilder addColumn(ColumnKey<T> key, T... data)
addColumn(ColumnKey, Collection) with the specified data
wrapped into Arrays.asList(Object...)public <T> ColumnsBuilder addColumn(ColumnKey<T> key, java.util.Collection<T> data)
addColumn(Column) with a new Column instance being created
using specified key and data.public ColumnsBuilder addColumn(Column<?> column)
addColumn(Column, int) with current number of columns specified as index,
so new column will be added at the end of the list.public ColumnsBuilder addColumn(Column<?> column, int idx)
Add specified column at the specified in the list.
Index works the same way as in the List.add(int, Object).
java.lang.IllegalArgumentException - if isPresent(ColumnKey) returns true
for the key of the specified column.public <T> Column<T> removeColumn(ColumnKey<T> key)
null if there was no such column.public Columns build()
Columns instance, using result of the getColumns() method as input data.public java.lang.String toString()
toString in class java.lang.Object