Class TablePrinter
java.lang.Object
org.strassburger.subscriptionmanager.util.TablePrinter
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TablePrinter with no headers and no rows.Creates a new TablePrinter with the given headers and rows. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a row to the table at the given index.voidAdds a row to the table.voidClears all rows from the table.getRows()voidvoidremoveRow(int index) Removes a row from the table at the given index.voidsetHeaders(List<String> headers) Sets the headers of the table.voidSets the rows of the table.
-
Constructor Details
-
TablePrinter
public TablePrinter()Creates a new TablePrinter with no headers and no rows. -
TablePrinter
Creates a new TablePrinter with the given headers and rows.- Parameters:
headers- The headers of the table.rows- The rows of the table.
-
-
Method Details
-
setHeaders
Sets the headers of the table. -
setRows
Sets the rows of the table. -
addRow
Adds a row to the table. -
addRow
Adds a row to the table at the given index. -
removeRow
public void removeRow(int index) Removes a row from the table at the given index. -
clearRows
public void clearRows()Clears all rows from the table. -
getHeaders
-
getRows
-
getColumnWidths
-
printTable
public void printTable()
-