Class TableCellIterator
java.lang.Object
com.itextpdf.pdfua.checkers.utils.tables.TableCellIterator
- All Implemented Interfaces:
ITableIterator<Cell>
Class that iterates over the cells of a table.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final PdfUAValidationContext
private Cell
private TableCellIterator
private TableCellIterator
private int
private PdfName
private Table
-
Constructor Summary
ConstructorsConstructorDescriptionTableCellIterator
(Table table, PdfUAValidationContext context) Creates a newTableCellIterator
instance. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the number of rows in the body of the table.int
Gets the number of rows in the footer of the table.int
Gets the number of rows in the header of the table.int
getCol()
Gets the column index of current position.int
Gets the colspan of the current positionprivate PdfName
int
Returns the amount of columns the table has.int
getRow()
Gets the row index of the current position.int
Gets the rowspan of current position.boolean
hasNext()
Checks if there is a next element in the iteration.next()
Gets the next element in the iteration.
-
Field Details
-
context
-
children
-
index
private int index -
headerIterator
-
table
-
location
-
currentCell
-
-
Constructor Details
-
TableCellIterator
Creates a newTableCellIterator
instance.- Parameters:
table
- the table that will be iterated.context
- the validation context.
-
-
Method Details
-
hasNext
public boolean hasNext()Checks if there is a next element in the iteration.- Specified by:
hasNext
in interfaceITableIterator<Cell>
- Returns:
true
if there is a next element,false
otherwise.
-
next
Gets the next element in the iteration.- Specified by:
next
in interfaceITableIterator<Cell>
- Returns:
- The next element.
-
getAmountOfRowsBody
public int getAmountOfRowsBody()Gets the number of rows in the body of the table.- Specified by:
getAmountOfRowsBody
in interfaceITableIterator<Cell>
- Returns:
- The number of rows in the body of the table.
-
getAmountOfRowsHeader
public int getAmountOfRowsHeader()Gets the number of rows in the header of the table.- Specified by:
getAmountOfRowsHeader
in interfaceITableIterator<Cell>
- Returns:
- The number of rows in the header of the table.
-
getNumberOfColumns
public int getNumberOfColumns()Returns the amount of columns the table has. All rows in a table in UA specification must have the same column count. So return the max column count for correctly generated error messages.- Specified by:
getNumberOfColumns
in interfaceITableIterator<Cell>
- Returns:
- the amount of columns
-
getRow
public int getRow()Gets the row index of the current position.- Specified by:
getRow
in interfaceITableIterator<Cell>
- Returns:
- The row index.
-
getCol
public int getCol()Gets the column index of current position.- Specified by:
getCol
in interfaceITableIterator<Cell>
- Returns:
- The column index.
-
getRowspan
public int getRowspan()Gets the rowspan of current position.- Specified by:
getRowspan
in interfaceITableIterator<Cell>
- Returns:
- the rowspan
-
getColspan
public int getColspan()Gets the colspan of the current position- Specified by:
getColspan
in interfaceITableIterator<Cell>
- Returns:
- the colspan of current position
-
getLocation
-