public class MarkdownTable extends Object
Modifier and Type | Class and Description |
---|---|
static class |
MarkdownTable.Alignment
Simple enum to manage the alignment of a column.
|
Constructor and Description |
---|
MarkdownTable()
Creates a new, empty MarkdownTable
|
Modifier and Type | Method and Description |
---|---|
List<MarkdownTableCell> |
addBodyRow()
Creates a new body row, and returns it so it can have cells added to it.
|
List<MarkdownTableCell> |
addHeaderRow()
Creates a new header row, and returns it so it can have cells added to it.
|
int |
getNumberOfColumns()
Returns the total number of columns in this table.
|
void |
renderTable(PrintWriter output,
boolean allowColspan,
boolean renderAsCode)
Renders out the final table.
|
public List<MarkdownTableCell> addHeaderRow()
public List<MarkdownTableCell> addBodyRow()
public void renderTable(PrintWriter output, boolean allowColspan, boolean renderAsCode)
output
- The writer to receive the final output.allowColspan
- If true, cells that span multiple columns are preserved. If false, they are rendered in
their own column, then empty columns are placed after.renderAsCode
- If true, the output is rendered as a code blockpublic int getNumberOfColumns()
Copyright © 2017. All rights reserved.