Package com.extractpdf4j.helpers
Class Table
java.lang.Object
com.extractpdf4j.helpers.Table
Table
Immutable-style value object describing a rectangular grid of cell text along with the column/row boundary positions (in pixel or point units depending on the parser). Cell lists are defensively copied on construction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasList()Returns an unmodifiable deep copy view of the cells.cell(int r, int c) Returns the cell value at rowr, columnc.intncols()Number of columns in the table (0 if there are no rows).intnrows()Number of rows in the table.voidMutates the cell at rowr, columncwith valuev.toCSV(char sep) Serializes the table to CSV using the given separator.
-
Constructor Details
-
Table
-
-
Method Details
-
nrows
public int nrows()Number of rows in the table. -
ncols
public int ncols()Number of columns in the table (0 if there are no rows). -
cell
Returns the cell value at rowr, columnc. -
setCell
Mutates the cell at rowr, columncwith valuev. -
asList
Returns an unmodifiable deep copy view of the cells. Each inner row list is unmodifiable to prevent external mutation. -
toCSV
Serializes the table to CSV using the given separator. Fields containing the separator, double quotes, or newlines are quoted; embedded quotes are escaped as a pair of quotes. No trailing newline is added. -
getColBoundaries
-
getRowBoundaries
-