MCPcopy Create free account
hub / github.com/Teneted/Tenet / append

Method append

src/main/java/net/minecraftforge/common/util/TextTable.java:73–84  ·  view source on GitHub ↗

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

(StringBuilder destination, String lineEnding)

Source from the content-addressed store, hash-verified

71 * @param lineEnding the line ending to use for each row of the table
72 */
73 public void append(StringBuilder destination, String lineEnding)
74 {
75 List<String> headers = columns.stream().map(c -> c.formatHeader(" ")).collect(Collectors.toList());
76 printRow(destination, headers);
77 destination.append(lineEnding);
78 printSeparators(destination);
79 for (Row row : rows)
80 {
81 destination.append(lineEnding);
82 printRow(destination, row.format(columns, " "));
83 }
84 }
85
86 private void printSeparators(StringBuilder destination)
87 {

Callers 15

buildMethod · 0.95
executeMethod · 0.45
PluginLoggerMethod · 0.45
buildCommandMethod · 0.45
registerServerAliasesMethod · 0.45
tabCompleteMethod · 0.45
toStringMethod · 0.45
executeMethod · 0.45
getNameListMethod · 0.45
getPluginListMethod · 0.45
executeMethod · 0.45
createPathMethod · 0.45

Calls 6

printRowMethod · 0.95
printSeparatorsMethod · 0.95
streamMethod · 0.80
formatHeaderMethod · 0.80
mapMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected