Class ArrayTableModel

java.lang.Object
org.springframework.shell.table.TableModel
org.springframework.shell.table.ArrayTableModel

public class ArrayTableModel extends TableModel
A TableModel backed by a row-first array.
  • Constructor Details

    • ArrayTableModel

      public ArrayTableModel(Object[][] data)
  • 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.