Base class for cells used in this CSV library.
Base class for cells used in this CSV library.
The two main APIs of this library the table oriented and the stream oriented use subclasses of this class to represent the data.
One important use for this class is in CsvReader. CsvReader outputs instances of StringCell which is a subclass of this class.
See the documentation of cellKey member below for design rationale on having coordinates in each cell.
Coordinates of a Cell in a CSV "table".
Coordinates of a Cell in a CSV "table".
Basically a composition of RowKey and ColKey or alternatively just two zero based integers rowIndex and colIndex.
Each Cell has a CellKey
as a member.
Columns and rows are thought to start from top left corner.
Typically in spreadsheet programs columns are numbered with an alphabetical scheme and the row number is a one based integer.
CellKeys are ordered first in increasing row order and then in increasing column order.
The object representations provide type safety and spread sheet style column and row numbering.
Cell.Parser subtypes produce these errors when they can't parse the cell content string.
Type for columns numbers used in parsed CSV data.
Type for columns numbers used in parsed CSV data.
This corresponds to Nth position separated by separator characters on each line in CSV text file.
Most interesting functionality is the conversion of integer indices into alphabetical numbering used in spreadsheet programs.
zero based column number (column index).
See documentation on IntegerCell.
See documentation on IntegerCell. This is basically same, but with Double
instead of Int.
Basically this class is a sample implementation of a more specialised subtype of fi.pelam.csv.cell.Cell.
Basically this class is a sample implementation of a more specialised subtype of fi.pelam.csv.cell.Cell.
It is expected that any nontrivial client will want to specify its own subtypes of fi.pelam.csv.cell.Cell.
This class is quite simple, but the companion object is more interesting as it provides Cell.Parser functions which produce IntegerCell instances (or errors if parsing fails) from String data.
the location of this cell in a CSV table.
is the integer stored in CSV.
A function used to convert the integer held by this cell into a String
to be stored in CSV text data.
Type for row numbers used in parsed CSV data.
Type for row numbers used in parsed CSV data.
This corresponds to zero based row number in CSV text file.
zero based row number (row index).
The most basic subtype of Cell.
The most basic subtype of Cell.
This cell type simply contains the raw data from a position in a CSV text file.
the location of the cell in the CSV file.
simply the string from the CSV file.
However note that any possible quoting is removed and no separator or CSV line ending characters are included.
The lower level CSV parser API CsvReader produces these.
See documentation on IntegerCell.
See documentation on IntegerCell. This is basically same, but with Double
instead of Int.
The IntegerCell class it self is quite simple, but this companion object is more interesting as provides Cell.Parser functions.
The IntegerCell class it self is quite simple, but this companion object is more interesting as provides Cell.Parser functions. These functions in turn produce IntegerCell instances (or errors if parsing fails) from String data.
Cell.Parser functions can be used used to upgrade cells in fi.pelam.csv.table.TableReader in an easy way by using them in a map passed to fi.pelam.csv.table.TableReaderConfig.makeCellUpgrader. The map specifies which cells should be interpreted as containing integers.
This package contains the low level data types used for representing a single cell in CSV data.
The abstract base class for Cells.