com.univocity.parsers.common.processor
Class ObjectRowListProcessor

java.lang.Object
  extended by com.univocity.parsers.common.DefaultConversionProcessor
      extended by com.univocity.parsers.common.processor.core.AbstractObjectProcessor<T>
          extended by com.univocity.parsers.common.processor.core.AbstractObjectListProcessor<ParsingContext>
              extended by com.univocity.parsers.common.processor.ObjectRowListProcessor
All Implemented Interfaces:
ConversionProcessor, Processor<ParsingContext>, RowProcessor

public class ObjectRowListProcessor
extends AbstractObjectListProcessor<ParsingContext>
implements RowProcessor

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 ObjectRowListProcessor#rowProcessed(Object[], ParsingContext)} method for each parsed record.

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

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

Constructor Summary
ObjectRowListProcessor()
           
 
Method Summary
 
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractObjectListProcessor
getHeaders, getRows, processEnded, processStarted, rowProcessed
 
Methods inherited from class com.univocity.parsers.common.processor.core.AbstractObjectProcessor
rowProcessed
 
Methods inherited from class com.univocity.parsers.common.DefaultConversionProcessor
applyConversions, convertAll, convertFields, convertIndexes, convertType, handleConversionError, initializeConversions, reverseConversions, toDataProcessingException
 
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

ObjectRowListProcessor

public ObjectRowListProcessor()


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