public class Collector extends CellProcessorAdaptor implements BoolCellProcessor, DateCellProcessor, DoubleCellProcessor, LongCellProcessor, StringCellProcessor
next| Constructor and Description |
|---|
Collector(Collection<Object> collection)
Constructs a new Collector, which collects each value it encounters and adds it to the supplied
Collection.
|
Collector(Collection<Object> collection,
CellProcessor next)
Constructs a new Collector, which collects each value it encounters, adds it to the supplied Collection,
then calls the next processor in the chain.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(Object value,
CsvContext context)
This method is invoked by the framework when the processor needs to process data or check constraints.
|
Collection<Object> |
getCollection()
Gets the collection of collected values.
|
toString, validateInputNotNullpublic Collector(Collection<Object> collection)
collection - the collection to add toNullPointerException - if collection is nullpublic Collector(Collection<Object> collection, CellProcessor next)
collection - the collection to add tonext - the next processor in the chainNullPointerException - if collection or next is nullpublic Object execute(Object value, CsvContext context)
execute in interface CellProcessorvalue - the value to be processedcontext - the CSV contextpublic Collection<Object> getCollection()
Copyright © 2007-2015 Super CSV. All Rights Reserved.