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 PdfUAValidationContextprivate Cellprivate TableCellIteratorprivate TableCellIteratorprivate intprivate PdfNameprivate Table -
Constructor Summary
ConstructorsConstructorDescriptionTableCellIterator(Table table, PdfUAValidationContext context) Creates a newTableCellIteratorinstance. -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of rows in the body of the table.intGets the number of rows in the footer of the table.intGets the number of rows in the header of the table.intgetCol()Gets the column index of current position.intGets the colspan of the current positionprivate PdfNameintReturns the amount of columns the table has.intgetRow()Gets the row index of the current position.intGets the rowspan of current position.booleanhasNext()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 newTableCellIteratorinstance.- 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:
hasNextin interfaceITableIterator<Cell>- Returns:
trueif there is a next element,falseotherwise
-
next
Gets the next element in the iteration.- Specified by:
nextin interfaceITableIterator<Cell>- Returns:
- the next element
-
getAmountOfRowsBody
public int getAmountOfRowsBody()Gets the number of rows in the body of the table.- Specified by:
getAmountOfRowsBodyin 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:
getAmountOfRowsHeaderin 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:
getNumberOfColumnsin interfaceITableIterator<Cell>- Returns:
- the amount of columns
-
getRow
public int getRow()Gets the row index of the current position.- Specified by:
getRowin interfaceITableIterator<Cell>- Returns:
- the row index
-
getCol
public int getCol()Gets the column index of current position.- Specified by:
getColin interfaceITableIterator<Cell>- Returns:
- the column index
-
getRowspan
public int getRowspan()Gets the rowspan of current position.- Specified by:
getRowspanin interfaceITableIterator<Cell>- Returns:
- the rowspan
-
getColspan
public int getColspan()Gets the colspan of the current position- Specified by:
getColspanin interfaceITableIterator<Cell>- Returns:
- the colspan of current position
-
getLocation
-