Class BeanListTableModel<T>

java.lang.Object
org.springframework.shell.table.TableModel
org.springframework.shell.table.BeanListTableModel<T>

public class BeanListTableModel<T> extends TableModel
A table model that is backed by a list of beans.

One can control which properties are exposed (and their order). There is also a convenience constructor for adding a special header row.

  • Constructor Details

  • Method Details

    • getRowCount

      public int getRowCount()
      Specified by:
      getRowCount in class TableModel
      Returns:
      the number of rows that can be queried. Values between 0 and rowCount-1 inclusive are valid values.
    • getColumnCount

      public int getColumnCount()
      Specified by:
      getColumnCount in class TableModel
      Returns:
      the number of columns that can be queried. Values between 0 and columnCount-1 inclusive are valid values.
    • getValue

      public Object getValue(int row, int column)
      Specified by:
      getValue in class TableModel
      Parameters:
      row - the row that is being queried
      column - the column that is being queried
      Returns:
      the data value to be displayed at a given row and column, which may be null.