public class HashMapper extends CellProcessorAdaptor implements BoolCellProcessor, DateCellProcessor, DoubleCellProcessor, LongCellProcessor, StringCellProcessor
next| Constructor and Description |
|---|
HashMapper(java.util.Map<java.lang.Object,java.lang.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(java.util.Map<java.lang.Object,java.lang.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.
|
HashMapper(java.util.Map<java.lang.Object,java.lang.Object> mapping,
java.lang.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(java.util.Map<java.lang.Object,java.lang.Object> mapping,
java.lang.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.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
execute(java.lang.Object value,
CsvContext context)
This method is invoked by the framework when the processor needs to process data or check constraints.
|
toString, validateInputNotNullpublic HashMapper(java.util.Map<java.lang.Object,java.lang.Object> mapping)
mapping - the Mapjava.lang.NullPointerException - if mapping is nulljava.lang.IllegalArgumentException - if mapping is emptypublic HashMapper(java.util.Map<java.lang.Object,java.lang.Object> mapping,
java.lang.Object defaultValue)
mapping - the MapdefaultValue - the value to return if no mapping is foundjava.lang.NullPointerException - if mapping is nulljava.lang.IllegalArgumentException - if mapping is emptypublic HashMapper(java.util.Map<java.lang.Object,java.lang.Object> mapping,
CellProcessor next)
mapping - the Mapnext - the next processor in the chainjava.lang.NullPointerException - if mapping or next is nulljava.lang.IllegalArgumentException - if mapping is emptypublic HashMapper(java.util.Map<java.lang.Object,java.lang.Object> mapping,
java.lang.Object defaultValue,
CellProcessor next)
mapping - the MapdefaultValue - the value to return if no mapping is foundnext - the next processor in the chainjava.lang.NullPointerException - if mapping or next is nulljava.lang.IllegalArgumentException - if mapping is emptypublic java.lang.Object execute(java.lang.Object value,
CsvContext context)
execute in interface CellProcessorvalue - the value to be processedcontext - the CSV contextSuperCsvCellProcessorException - if value is nullCopyright © 2007-2014 Super CSV. All Rights Reserved.