Class TableStructElementIterator
java.lang.Object
com.itextpdf.pdfua.checkers.utils.tables.TableStructElementIterator
Creates an iterator to iterate over the table structures.
-
Constructor Summary
ConstructorsConstructorDescriptionTableStructElementIterator(PdfStructElem tableStructElem, PdfUAValidationContext context) Creates a newTableStructElementIteratorinstance. -
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 zero-based column index of the current table element.intGets the colspan attribute value of the current table element.intGets the total number of columns in the table.intgetRow()Gets the zero-based row index of the current table element.intGets the rowspan attribute value of the current table element.booleanhasNext()Checks if there is a next element in the iteration.next()Gets the next table structure element in the iteration.
-
Constructor Details
-
TableStructElementIterator
Creates a newTableStructElementIteratorinstance.- Parameters:
-
tableStructElem- the root table struct element. -
context- the validation context.
-
-
Method Details
-
hasNext
public boolean hasNext()Checks if there is a next element in the iteration.- Returns:
-
trueif there is a next element,falseotherwise
-
next
Gets the next table structure element in the iteration.- Returns:
-
the next
PdfStructElemin the iteration
-
getAmountOfRowsBody
public int getAmountOfRowsBody()Gets the number of rows in the body of the table.- Returns:
- the number of rows in the table body
-
getAmountOfRowsHeader
public int getAmountOfRowsHeader()Gets the number of rows in the header of the table.- Returns:
- the number of rows in the table header
-
getNumberOfColumns
public int getNumberOfColumns()Gets the total number of columns in the table.- Returns:
- the total number of columns in the table
-
getRow
public int getRow()Gets the zero-based row index of the current table element.- Returns:
- the zero-based row index of the current element
-
getCol
public int getCol()Gets the zero-based column index of the current table element.- Returns:
- the zero-based column index of the current element
-
getRowspan
public int getRowspan()Gets the rowspan attribute value of the current table element.- Returns:
- the rowspan value of the current element (minimum 1)
-
getColspan
public int getColspan()Gets the colspan attribute value of the current table element.- Returns:
- the colspan value of the current element (minimum 1)
-