com.univocity.parsers.common.processor
Class ColumnProcessor

java.lang.Object
  extended by com.univocity.parsers.common.processor.core.AbstractColumnProcessor<ParsingContext>
      extended by com.univocity.parsers.common.processor.ColumnProcessor
All Implemented Interfaces:
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

Author:
uniVocity Software Pty Ltd - parsers@univocity.com
See Also:
AbstractParser, RowProcessor

Constructor Summary
ColumnProcessor()
          Constructs a column processor, pre-allocating room for 1000 rows.
ColumnProcessor(int expectedRowCount)
          Constructs a column processor pre-allocating room for the expected number of rows to be processed
 
Method Summary
 
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractColumnProcessor
getColumn, getColumn, getColumnValuesAsList, getColumnValuesAsMapOfIndexes, getColumnValuesAsMapOfNames, getHeaders, processEnded, processStarted, putColumnValuesInMapOfIndexes, putColumnValuesInMapOfNames, rowProcessed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.univocity.parsers.common.processor.RowProcessor
processEnded, processStarted, rowProcessed
 

Constructor Detail

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


Copyright © 2016 uniVocity Software Pty Ltd. All rights reserved.