public class ParseEnum extends CellProcessorAdaptor implements StringCellProcessor
next| Constructor and Description |
|---|
ParseEnum(java.lang.Class<T> enumClass)
Constructs a new ParseEnum processor, which converts a String to a Enum.
|
ParseEnum(java.lang.Class<T> enumClass,
boolean ignoreCase)
Constructs a new ParseEnum processor, which converts a String to a Enum, ignoring the case of the input
(or not) depending on the supplied flag.
|
ParseEnum(java.lang.Class<T> enumClass,
boolean ignoreCase,
CellProcessor next)
Constructs a new ParseEnum processor, which converts a String to a Enum, ignoring the case of the input
(or not) depending on the supplied flag, then calls the next processor in the chain.
|
ParseEnum(java.lang.Class<T> enumClass,
CellProcessor next)
Constructs a new ParseEnum processor, which converts a String to a Enum then calls the next processor in
the chain.
|
| 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 ParseEnum(java.lang.Class<T> enumClass)
T - the Enum typeenumClass - the enum class to convert tojava.lang.NullPointerException - if enumClass is nullpublic ParseEnum(java.lang.Class<T> enumClass,
boolean ignoreCase)
T - the Enum typeenumClass - the enum class to convert toignoreCase - whether to ignore the case of the inputjava.lang.NullPointerException - if enumClass is nullpublic ParseEnum(java.lang.Class<T> enumClass,
CellProcessor next)
T - the Enum typeenumClass - the enum class to convert tonext - the next processor in the chainjava.lang.NullPointerException - if enumClass or next is nullpublic ParseEnum(java.lang.Class<T> enumClass,
boolean ignoreCase,
CellProcessor next)
T - the Enum typeenumClass - the enum class to convert toignoreCase - whether to ignore the case of the inputnext - the next processor in the chainjava.lang.NullPointerException - if enumClass or next is nullpublic 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 null or can't be parsed as an EnumCopyright © 2007-2014 Super CSV. All Rights Reserved.