Class ColumnProcessor

All Implemented Interfaces:
ColumnReader<String>, Processor<ParsingContext>, RowProcessor

public class ColumnProcessor extends AbstractColumnProcessor<ParsingContext> implements RowProcessor
A simple RowProcessor implementation that stores values of columns. Values parsed in each row will be split into columns of Strings. Each column has its own list of values.

At the end of the process, the user can access the lists with values parsed for all columns using the methods AbstractColumnProcessor.getColumnValuesAsList(), AbstractColumnProcessor.getColumnValuesAsMapOfIndexes() and AbstractColumnProcessor.getColumnValuesAsMapOfNames().

Note: Storing the values of all columns may be memory intensive. For large inputs, use a BatchedColumnProcessor instead

See Also:
  • Constructor Details

    • ColumnProcessor

      public ColumnProcessor()
      Constructs a column processor, pre-allocating room for 1000 rows.
    • ColumnProcessor

      public ColumnProcessor(int expectedRowCount)
      Constructs a column processor pre-allocating room for the expected number of rows to be processed
      Parameters:
      expectedRowCount - the expected number of rows to be processed