private void formatRow(Formatter formatter, final List<TableEntry<?>> row) { this.clearScratchBuilder(); this.scratchBuilder.append(' '); final Object[] formatArgs = new Object[this.columnWidths.size()]; for (int column = 0; column < this.columnWidths.size(); column++) { if (column > 0) { this.scratchBuilder.append(" | "); } final int width = this.columnWidths.get(column); final TableEntry<?> header = row.get(column); formatArgs[column] = header.getValue(); this.scratchBuilder.append(header.getFormatString(width)); } this.scratchBuilder.append(" %n"); formatter.format(this.scratchBuilder.toString(), formatArgs); }
private void formatRow(Formatter formatter, final List<TableEntry<?>> row) { this.clearScratchBuilder(); this.scratchBuilder.append(' '); final Object[] formatArgs = new Object[this.columnWidths.size()]; for (int column = 0; column < this.columnWidths.size(); column++) { if (column > 0) { this.scratchBuilder.append(" | "); } final int width = this.columnWidths.get(column); final TableEntry<?> header = row.get(column); formatArgs[column] = header.getValue(); this.scratchBuilder.append(header.getFormatString(width)); } this.scratchBuilder.append(" %n"); formatter.format(this.scratchBuilder.toString(), formatArgs); }
private <T> int estimateEntryLength(TableEntry<T> entry) { clearScratchBuilder(); this.scratchFormatter.format(entry.getFormatString(), entry.getValue()); return this.scratchBuilder.length(); }
protected String getFormatString() { return this.getFormatString(1); }
protected String getFormatString() { return this.getFormatString(1); }
private <T> int estimateEntryLength(TableEntry<T> entry) { clearScratchBuilder(); this.scratchFormatter.format(entry.getFormatString(), entry.getValue()); return this.scratchBuilder.length(); }