Top Methods
io.github.kusoroadeolu.clique.components

public Interface PendingTable

Known Direct Implementers
io.github.kusoroadeolu.clique.components.TableHeaderBuilder
Annotations
@Stable
since:4.0.0
Imports
io.github.kusoroadeolu.clique.internal.documentation.Stable, java.util.Collection, .SequencedCollection, .SequencedMap

Since
4.0.0

Method Summary

Modifier and TypeMethod and Description
public Table

Returns:

the initialized Table
fromColumns
(SequencedMap<String, ? extends SequencedCollection<String>>
a map of header to column values, in display order
columns
)

Initializes the table from a column-oriented data source, where each entry maps a header to the values in that column, top to bottom.

public Table

Returns:

the initialized Table
fromRows
(SequencedCollection<? extends SequencedCollection<String>>
the rows, with the first row treated as headers
rows
)

Initializes the table from a row-oriented data source.

public Table

Returns:

the initialized Table
headers
(String...
the header labels, in display order
headers
)

Sets the table headers.

public Table

Returns:

the initialized Table
headers
(Collection<String>
the header labels
headers
)
Deprecated since 4.0.3. in favor of the SequencedCollection overload

Sets the table headers.

public Table

Returns:

the initialized Table
headers
(SequencedCollection<String>
the header labels, in display order
headers
)

Sets the table headers.

Method Detail

fromColumnsback to summary
public Table fromColumns(SequencedMap<String, ? extends SequencedCollection<String>> columns)

Initializes the table from a column-oriented data source, where each entry maps a header to the values in that column, top to bottom.

Columns of differing lengths are padded to the longest column.

Parameters
columns:SequencedMap<String, ? extends SequencedCollection<String>>

a map of header to column values, in display order

Returns:Table

the initialized Table

Exceptions
IllegalArgumentException:
if columns is null or empty
fromRowsback to summary
public Table fromRows(SequencedCollection<? extends SequencedCollection<String>> rows)

Initializes the table from a row-oriented data source. The first row is used as the table headers; all subsequent rows are added as data rows.

Parameters
rows:SequencedCollection<? extends SequencedCollection<String>>

the rows, with the first row treated as headers

Returns:Table

the initialized Table

Exceptions
IllegalArgumentException:
if rows is null or empty
headersback to summary
public Table headers(String... headers)

Sets the table headers.

Parameters
headers:String[]

the header labels, in display order

Returns:Table

the initialized Table

headersback to summary
public Table headers(Collection<String> headers)

Deprecated

since 4.0.3.

in favor of the SequencedCollection overload

Sets the table headers.

Parameters
headers:Collection<String>

the header labels

Returns:Table

the initialized Table

Annotations
@Deprecated
since:4.0.3
headersback to summary
public Table headers(SequencedCollection<String> headers)

Sets the table headers.

Parameters
headers:SequencedCollection<String>

the header labels, in display order

Returns:Table

the initialized Table