BoolCellProcessor, CellProcessor, DateCellProcessor, DoubleCellProcessor, LongCellProcessor, StringCellProcessorpublic class HashMapper extends CellProcessorAdaptor implements BoolCellProcessor, DateCellProcessor, DoubleCellProcessor, LongCellProcessor, StringCellProcessor
next| Constructor | Description |
|---|---|
HashMapper(Map<Object,Object> mapping) |
Constructs a new HashMapper processor, which maps from one object to another, by looking up a
Map with the input as the key, and returning its corresponding value.
|
HashMapper(Map<Object,Object> mapping,
Object defaultValue) |
Constructs a new HashMapper processor, which maps from one object to another, by looking up a
Map with the input as the key, and returning its corresponding value.
|
HashMapper(Map<Object,Object> mapping,
Object defaultValue,
CellProcessor next) |
Constructs a new HashMapper processor, which maps from one object to another, by looking up a
Map with the input as the key, and returning its corresponding value.
|
HashMapper(Map<Object,Object> mapping,
CellProcessor next) |
Constructs a new HashMapper processor, which maps from one object to another, by looking up a
Map with the input as the key, and returning its corresponding value.
|
| Modifier and Type | Method | Description |
|---|---|---|
Object |
execute(Object value,
CsvContext context) |
This method is invoked by the framework when the processor needs to process data or check constraints.
|
toString, validateInputNotNullpublic HashMapper(Map<Object,Object> mapping)
mapping - the MapNullPointerException - if mapping is nullIllegalArgumentException - if mapping is emptypublic HashMapper(Map<Object,Object> mapping, Object defaultValue)
mapping - the MapdefaultValue - the value to return if no mapping is foundNullPointerException - if mapping is nullIllegalArgumentException - if mapping is emptypublic HashMapper(Map<Object,Object> mapping, CellProcessor next)
mapping - the Mapnext - the next processor in the chainNullPointerException - if mapping or next is nullIllegalArgumentException - if mapping is emptypublic HashMapper(Map<Object,Object> mapping, Object defaultValue, CellProcessor next)
mapping - the MapdefaultValue - the value to return if no mapping is foundnext - the next processor in the chainNullPointerException - if mapping or next is nullIllegalArgumentException - if mapping is emptypublic Object execute(Object value, CsvContext context)
execute in interface CellProcessorvalue - the value to be processedcontext - the CSV contextSuperCsvCellProcessorException - if value is nullCopyright © 2007–2018 Super CSV. All rights reserved.