Class TextTable
java.lang.Object
net.neoforged.neoforge.common.util.TextTable
Utility to format data into a textual (markdown-compliant) table.
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic class - 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<TextTable.Column>private final List<TextTable.Row> - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidvoidappend(StringBuilder destination, String lineEnding) Appends the data formatted as a table to the given string builder.voidclear()static TextTable.Columnstatic TextTable.Columncolumn(String header, TextTable.Alignment alignment) private voidprintRow(StringBuilder destination, List<String> values) private voidprintSeparators(StringBuilder destination)  
- 
Field Details
- 
columns
 - 
rows
 
 - 
 - 
Constructor Details
- 
TextTable
 
 - 
 - 
Method Details
- 
column
 - 
column
 - 
build
 - 
append
Appends the data formatted as a table to the given string builder. The padding character used for the column alignments is a single space (' '), the separate between column headers and values is a dash ('-'). Note that you *have* to specify a line ending, '\n' isn't used by default.The generated table is compliant with the markdown file format.
- Parameters:
 destination- a string builder to append the table tolineEnding- the line ending to use for each row of the table
 - 
printSeparators
 - 
printRow
 - 
add
 - 
clear
public void clear() - 
getColumns
 
 -