Package org.springframework.shell.table
Class TableModel
java.lang.Object
org.springframework.shell.table.TableModel
- Direct Known Subclasses:
ArrayTableModel
,BeanListTableModel
Abstracts away the contract a
Table
will use to retrieve tabular data.-
Constructor Details
-
TableModel
public TableModel()
-
-
Method Details
-
getRowCount
public abstract int getRowCount()- Returns:
- the number of rows that can be queried.
Values between 0 and
rowCount-1
inclusive are valid values.
-
getColumnCount
public abstract int getColumnCount()- Returns:
- the number of columns that can be queried.
Values between 0 and
columnCount-1
inclusive are valid values.
-
getValue
- Parameters:
row
- the row that is being queriedcolumn
- the column that is being queried- Returns:
- the data value to be displayed at a given row and column, which may be null.
-
transpose
- Returns:
- a transposed view of this model, where rows become columns and vice-versa.
-