Skip to content

Package io.github.sandydunlop.markista.doclet

Class MarkdownTable

java.lang.Object
        io.github.sandydunlop.markista.doclet.MarkdownTable


Nested Class Summary

Modifier and Type Class Description
MarkdownTable.Column

Field Summary

Modifier and Type Field Description
List<String[]> rows
List<MarkdownTable.Column> columns

Constructor Summary

Constructor Description
MarkdownTable()

Method Summary

Modifier and Type Method Description
void render(Writer writer) Renders the table as Markdown text without any indentation
void render(Writer writer, int indent) Renders the table as Markdown text with a given indentation level
MarkdownTable addRow(String[] valueStrings) Adds a row of data to the table
MarkdownTable addColumn(String heading) Adds a column with the specified heading to the table

Method Details

render

void render(Writer writer)

Renders the table as Markdown text without any indentation

Parameters:

writer - Renders the table as Markdown text without any indentation

render

void render(Writer writer, int indent)

Renders the table as Markdown text with a given indentation level

Parameters:

writer - Renders the table as Markdown text with a given indentation level

indent - Renders the table as Markdown text with a given indentation level

addRow

MarkdownTable addRow(String[] valueStrings)

Adds a row of data to the table

Parameters:

valueStrings - Adds a row of data to the table

Returns:

[The table]

addColumn

MarkdownTable addColumn(String heading)

Adds a column with the specified heading to the table

Parameters:

heading - Adds a column with the specified heading to the table

Returns:

[The table]