Interface IHeaderTable<T>
- Type Parameters:
T- The type of the cell values.
- All Superinterfaces:
Iterable<IHeaderTable.ITableRowEntry<T>>
- All Known Implementing Classes:
AbstractHeaderTable, ImmutableListHeaderTable
Represents a table with rows and a header.
- Since:
- 8.2.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a row in a table. -
Method Summary
Modifier and TypeMethodDescriptioncell(int row, int column) Gets the value at the given row and column.Gets the value at the given row and column.intReturns the number of columns in the table.Gets the names of each column.columnsByIndex(int row) Gets a view of the given row as a map.columnsByName(int row) Gets a view of the given row as a map.intcolumnToIndex(String column) Converts a column name to an index.booleanhasColumn(int column) Checks if the table has a column at the given index.booleanChecks if the table has a column with the given name.booleanhasRow(int row) Checks if the table has a row at the given index.indexToColumn(int index) Converts an index to a column name.default Iterator<IHeaderTable.ITableRowEntry<T>> iterator()row(int index) Returns a view of the given row.introwCount()Returns the number of rows in the table.Returns an iterator over the rows of the table.rows()Returns all rows;rows(int column) Returns a view of all rows at the given column.Returns a view of all rows at the given column.Methods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
cell
-
cell
Gets the value at the given row and column.- Parameters:
row- The row index.column- The column index.- Returns:
- The value at the given row and column.
-
columnCount
int columnCount()Returns the number of columns in the table.- Returns:
- The number of columns.
-
columnNames
-
columnToIndex
Converts a column name to an index.- Parameters:
column- The column name.- Returns:
- The index of the column.
- Throws:
IndexOutOfBoundsException- When the column does not exist.
-
columnsByIndex
-
columnsByName
-
hasColumn
boolean hasColumn(int column) Checks if the table has a column at the given index.- Parameters:
column- The name of the column.- Returns:
trueif the table has a column at the given index,falseotherwise.
-
hasColumn
Checks if the table has a column with the given name.- Parameters:
column- The name of the column.- Returns:
trueif the table has a column with the given name,falseotherwise.
-
hasRow
boolean hasRow(int row) Checks if the table has a row at the given index.- Parameters:
row- The index of the row.- Returns:
trueif the table has a row at the given index,falseotherwise.
-
indexToColumn
Converts an index to a column name.- Parameters:
index- The index of the column.- Returns:
- The column name.
- Throws:
IndexOutOfBoundsException- When the column does not exist.
-
iterator
-
row
-
rowCount
int rowCount()Returns the number of rows in the table.- Returns:
- The number of rows.
-
rowIterator
Iterator<IHeaderTable.ITableRowEntry<T>> rowIterator()Returns an iterator over the rows of the table.- Returns:
- An iterator over the rows of the table.
-
rows
-
rows
-
rows
-