www.sdmetrics.com

sdmetrics.app
Interface DataTable

All Known Implementing Classes:
DesignComparator, ElementPoolAdapter, MeasurementCatalog, RelMatrixAdapter, RuleCheckAdapter, TableView

public interface DataTable

This interface is used to access all kinds of measurement data (metrics, descriptive statistics, design rule violations, relation matrices). The interface provides access to a list of tables. Each table is addressed by an index. Each table has


Method Summary
 java.lang.String getColumnDescription(int index, int col)
          Return a short description of a column.
 java.lang.String getColumnName(int index, int col)
          Return the name of the object a column represents (column header).
 int getNumberOfColumns(int index)
          Return the number of columns in a table.
 int getNumberOfRows(int index)
          Return the number of rows in a table.
 int getNumberOfTables()
          Returns the number of available tables.
 java.lang.String getRowName(int index, int row)
          Return the name of the object a row represents (row header).
 java.lang.String getTableName(int index)
          Returns the name of a table.
 int getTypeID(int index)
          Return the metamodel type ID of the elements of a table.
 java.lang.Object getValueAt(int index, int row, int col)
          Return the table cell value at a particular coordinate.
 

Method Detail

getNumberOfTables

public int getNumberOfTables()
Returns the number of available tables.

Returns:
The number of tables, n. Valid table indices run from 0 to n-1.

getTableName

public java.lang.String getTableName(int index)
Returns the name of a table.

Parameters:
index - Index of the table to access.
Returns:
String with the name of the table.

getNumberOfRows

public int getNumberOfRows(int index)
Return the number of rows in a table. Note: This does NOT include the column header row with the column names.

Parameters:
index - Index of the table to access.
Returns:
The number of rows in the table, r. Valid row indices for the table run from 0 to r-1.

getNumberOfColumns

public int getNumberOfColumns(int index)
Return the number of columns in a table. Note: This does NOT include the column with the row headers (names).

Parameters:
index - Index of the table to access.
Returns:
Number of columns in the table, c. Valid column indices for the table run from 0 to c-1.

getValueAt

public java.lang.Object getValueAt(int index,
                                   int row,
                                   int col)
Return the table cell value at a particular coordinate.

Parameters:
index - Index of the table to access.
row - Index of the row to access.
col - Index of the column to access.
Returns:
Table cell value at the specified coordinates.

getRowName

public java.lang.String getRowName(int index,
                                   int row)
Return the name of the object a row represents (row header).

Parameters:
index - Index of the table to access.
row - Index of the row.
Returns:
The name of the row.

getColumnName

public java.lang.String getColumnName(int index,
                                      int col)
Return the name of the object a column represents (column header).

Parameters:
index - Index of the table to access.
col - Index of the column.
Returns:
The name of the column to be used as column header.

getColumnDescription

public java.lang.String getColumnDescription(int index,
                                             int col)
Return a short description of a column. The description is a short string (one-liner), providing a brief, informal description of the column, and can be used, e.g., as a tool tip for the column headers when displaying the table on screen.

Parameters:
index - Index of the table to access.
col - Index of the column.
Returns:
String with an informal description of the column.

getTypeID

public int getTypeID(int index)
Return the metamodel type ID of the elements of a table.

Parameters:
index - Index of the table to access.
Returns:
Type ID of the model elements of that table.

www.sdmetrics.com