Coffee Table is a lightweight tabular data structure for Java. It comes handy when you need to organize data of a certain type into columns and rows while retaining full control over individual table cells. With Coffee Table you can easily:
- add/remove rows and columns
- get/set data stored in individual cells
- chain API methods for improved readability
- save oceans of your precious time
Adds a headered column to a table. Column cell values may be passed in. Their references will be mapped onto any existing row cells.
Adds a row to a table. Row cell values may be passed in. Their references will be mapped onto any existing column cells.
Returns the value of a cell at the specified column and row index.
Returns the number of columns in a table.
Return the header of a column at the specified index.
Returns a list of cell values of a column at the specified index.
Returns the number of rows in a table.
Returns a list of cell values of a row at the specified index.
Removes a column at the specified index.
Removes a row at the specified index.
Sets the value of a cell at the specified column and row index.
Table<String> myTable = new Table<String>();
myTable.addColumn("First Name").addColumn("Last Name").addColumn("City");
myTable
.addRow("John", "Smith", "New York")
.addRow("Robert", "Johnson", "Boston");
myTable.setCellValue(0, 1, "Christopher").removeColumn(2);
1.2.8