Top Description Constructors Methods
com.univocity.parsers.common.processor

public Class ObjectRowListProcessor

extends AbstractObjectListProcessor<ParsingContext>
implements RowProcessor
Class Inheritance
All Implemented Interfaces
com.univocity.parsers.common.processor.RowProcessor, com.univocity.parsers.common.processor.core.Processor
Imports
com.univocity.parsers.common.*, com.univocity.parsers.common.processor.core.*, java.util.*

A convenience RowProcessor implementation for storing all rows parsed and converted to Object arrays into a list. A typical use case of this class will be:
ObjectRowListProcessor processor = new ObjectRowListProcessor();
processor.convertIndexes(Conversions.toBigDecimal()).set(4, 6);
parserSettings.setRowProcessor(new ObjectRowListProcessor());
parser.parse(reader); // will invoke the {@link AbstractObjectListProcessor#rowProcessed(Object[], Context)} method for each parsed record.

String[] headers = rowProcessor.getHeaders();
List<Object[]> rows = rowProcessor.getRows();
BigDecimal value1 = (BigDecimal) row.get(4);
BigDecimal value2 = (BigDecimal) row.get(6);

Author
Univocity Software Pty Ltd - [email protected]
See Also
RowProcessor, ObjectRowProcessor, AbstractParser

Constructor Summary

AccessConstructor and Description
public
ObjectRowListProcessor()

Creates a new processor of Object[] rows with varying types.

public
ObjectRowListProcessor(int
expected number of rows to be parsed from the input. Used to pre-allocate the size of the output List returned by getRows()
expectedRowCount
)

Creates a new processor of Object[] rows with varying types.

Method Summary

Inherited from com.univocity.parsers.common.processor.core.AbstractObjectListProcessor:
getHeadersgetRowsprocessEndedprocessStartedrowProcessed

Constructor Detail

ObjectRowListProcessorback to summary
public ObjectRowListProcessor()

Creates a new processor of Object[] rows with varying types.

ObjectRowListProcessorback to summary
public ObjectRowListProcessor(int expectedRowCount)

Creates a new processor of Object[] rows with varying types.

Parameters
expectedRowCount:int

expected number of rows to be parsed from the input. Used to pre-allocate the size of the output List returned by getRows()