Interface Table
public interface Table
Table is the persistence object of DomTableEditorValue.- Since:
- 4.0.17
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumn(int index) Adds a new column at the specified index.voidaddRow(int index) Adds a new row at the specified index.voiddeleteColumn(int column) Deletes the column with the specified indexvoiddeleteRow(int row) Deletes the row with the specified indexCompute a difference between this element and the given one.@Nullable TableCellgetCell(int row, int column) Gets thecellof this table with the givenrow&colindex ornullif no cell exists with these indices.intReturns the numer of existing columns in this tablegetDom()Returns the element node of this table.intgetRows()Returns the number of existing rows in this table.booleanisEmpty()Indicates whether this table is empty or not.voidReplaces this table with the given table.
-
Method Details
-
getRows
Returns the number of existing rows in this table.- Since:
- 4.0.17
-
getColumns
@ApiDoc(comment="Returns the numer of existing columns in this table", since="4.0.17") int getColumns()Returns the numer of existing columns in this table- Since:
- 4.0.17
-
addRow
Adds a new row at the specified index. UseaddRow(0to add a new row at the beginning (will become first row). UsegetRows()as param to add a new row at the end of this table.- Parameters:
index- the index at which the new row should be added- Since:
- 4.0.17
-
deleteRow
Deletes the row with the specified index- Parameters:
row- the index of the row to be deleted- Since:
- 4.0.17
-
addColumn
@ApiDoc(comment="Adds a new column at the specified index.", since="4.0.17") void addColumn(int index) Adds a new column at the specified index. UseaddColumn(0to add a new column at the beginning (will become first column). UsegetColumns()as param to add a new column at the end (will become last column).- Parameters:
index- the index at which the new column should be added- Since:
- 4.0.17
-
deleteColumn
@ApiDoc(comment="Deletes the column with the specified index", since="4.0.17") void deleteColumn(int column) Deletes the column with the specified index- Parameters:
column- the index of the colum to be deleted- Since:
- 4.0.17
-
getCell
@ApiDoc(comment="Gets the cell of this table with the given row & col index or null if no cell exists with these indices.", since="4.0.17") @Nullable @Nullable TableCell getCell(int row, int column) Gets thecellof this table with the givenrow&colindex ornullif no cell exists with these indices.- Parameters:
row- the row indexcolumn- the col index- Returns:
- TableCell or
nullif no cell exists for given indices - Since:
- 4.0.17
-
getDom
Returns the element node of this table.- Since:
- 4.0.17
-
isEmpty
Indicates whether this table is empty or not.- Returns:
trueif this table is empty,falseotherwise- Since:
- 4.0.17
-
replace
@ApiDoc(comment="Replaces this table with the given table.", since="4.0.36") void replace(Table from) Replaces this table with the given table.- Parameters:
from- the table to replace this table with- Since:
- 4.0.36
-
diff
@ApiDoc(comment="Compute a difference between this element and the given one.", since="4.0.59") Element diff(Element other) Compute a difference between this element and the given one.- Parameters:
other- The element to compare to.- Returns:
- The difference element or
null, if equal. - Since:
- 4.0.59
-