Processor. Used to centralize common code used by implementations
of ColumnReader, namely:
AbstractColumnProcessor, AbstractObjectColumnProcessor, AbstractBatchedColumnProcessor and AbstractBatchedObjectColumnProcessor.
ColumnReader, AbstractColumnProcessor, AbstractObjectColumnProcessor, AbstractBatchedColumnProcessor, AbstractBatchedObjectColumnProcessor, Processor
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private List | |
| private int | |
| private String[] | |
| private long |
| Access | Constructor and Description |
|---|---|
| pack-priv | ColumnSplitter(int
the expected number of rows to be parsed expectedRowCount)Creates a splitter allocating a space for a give number of expected rows to be read |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | addValuesToColumns(T[]
the row whose column values will be split row, Context the current active parsing context. context)Splits the row and add stores the value of each column in its corresponding list in |
| pack-priv void | |
| pack-priv List | Returns: a list of lists. The stored lists correspond to the position of the column processed from the input; Each list contains the corresponding values parsed for a column, across multiple rows.Returns the values processed for each column |
| pack-priv < the type of data in that column V> List | Returns: a list with all data stored in the given columnthe position of the column in the input (0-based). columnIndex, Class<V> the type of data in that column columnType)Returns the values of a given column. |
| pack-priv < the type of data in that column V> List | Returns: a list with all data stored in the given columnthe name of the column in the input. columnName, Class<V> the type of data in that column columnType)Returns the values of a given column. |
| pack-priv Map | Returns: a map of column indexes and their respective list of values.Returns a map of column indexes and their respective list of values parsed from the input. |
| pack-priv Map | Returns: a map of column names and their respective list of values.Returns a map of column names and their respective list of values parsed from the input. |
| pack-priv String | Returns: the name of the column at the given index, or null if there's no header defined for the given column index.the index of the column whose header is to be obtained columnIndex)Returns the header of a particular column |
| pack-priv String[] | |
| private void | initialize(Context
the current active parsing context, which will be used to obtain information about headers and selected fields. context)Initializes the list of column values, the headers of each column and which columns to read if fields
have been selected using |
| pack-priv void | putColumnValuesInMapOfIndexes(Map<Integer, List<T>>
the map to hold the values of each column map)Fills a given map associating each column index to its list of values |
| pack-priv void | putColumnValuesInMapOfNames(Map<String, List<T>>
the map to hold the values of each column map)Fills a given map associating each column name to its list o values |
| pack-priv void |
| addNullsFrom | back to summary |
|---|---|
| private long addNullsFrom | |
| columnValues | back to summary |
|---|---|
| private List<List<T>> columnValues | |
| expectedRowCount | back to summary |
|---|---|
| private int expectedRowCount | |
| headers | back to summary |
|---|---|
| private String[] headers | |
| rowCount | back to summary |
|---|---|
| private long rowCount | |
| ColumnSplitter | back to summary |
|---|---|
| pack-priv ColumnSplitter(int expectedRowCount) Creates a splitter allocating a space for a give number of expected rows to be read
| |
| addValuesToColumns | back to summary |
|---|---|
| pack-priv void addValuesToColumns(T[] row, Context context) Splits the row and add stores the value of each column in its corresponding list in
| |
| clearValues | back to summary |
|---|---|
| pack-priv void clearValues() Removes any column values previously processed | |
| getColumnValues | back to summary |
|---|---|
| pack-priv List Returns the values processed for each column | |
| getColumnValues | back to summary |
|---|---|
| pack-priv <V> List Returns the values of a given column. | |
| getColumnValues | back to summary |
|---|---|
| pack-priv <V> List Returns the values of a given column. | |
| getColumnValuesAsMapOfIndexes | back to summary |
|---|---|
| pack-priv Map Returns a map of column indexes and their respective list of values parsed from the input. | |
| getColumnValuesAsMapOfNames | back to summary |
|---|---|
| pack-priv Map Returns a map of column names and their respective list of values parsed from the input. | |
| getHeader | back to summary |
|---|---|
| pack-priv String getHeader(int columnIndex) Returns the header of a particular column
| |
| getHeaders | back to summary |
|---|---|
| pack-priv String[] getHeaders() Returns the headers of the input. This can be either the headers defined in
| |
| initialize | back to summary |
|---|---|
| private void initialize(Context context) Initializes the list of column values, the headers of each column and which columns to read if fields
have been selected using
| |
| putColumnValuesInMapOfIndexes | back to summary |
|---|---|
| pack-priv void putColumnValuesInMapOfIndexes(Map<Integer, List<T>> map) Fills a given map associating each column index to its list of values | |
| putColumnValuesInMapOfNames | back to summary |
|---|---|
| pack-priv void putColumnValuesInMapOfNames(Map<String, List<T>> map) Fills a given map associating each column name to its list o values
| |
| reset | back to summary |
|---|---|
| pack-priv void reset() Prepares to execute a column splitting process from the beginning. Removes any column values previously processed, as well as information about headers in the input. Resets row count to 0. | |