T
- the Joda type that the processor returnspublic abstract class AbstractJodaParsingProcessor<T> extends CellProcessorAdaptor implements StringCellProcessor
next
Constructor and Description |
---|
AbstractJodaParsingProcessor()
Constructs a new AbstractJodaParsingProcessor processor, which
parses a String as a Joda type.
|
AbstractJodaParsingProcessor(CellProcessor next)
Constructs a new AbstractJodaParsingProcessor processor, which
parses a String as a Joda type, then calls the next processor in the
chain.
|
AbstractJodaParsingProcessor(DateTimeFormatter formatter)
Constructs a new AbstractJodaParsingProcessor processor, which
parses a String as a Joda type using the supplied formatter.
|
AbstractJodaParsingProcessor(DateTimeFormatter formatter,
CellProcessor next)
Constructs a new AbstractJodaParsingProcessor processor, which
parses a String as a Joda type using the supplied formatter, 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.
|
protected abstract T |
parse(String string)
Parses the String into the appropriate Joda type.
|
protected abstract T |
parse(String string,
DateTimeFormatter formatter)
Parses the String into the appropriate Joda type, using the supplied
formatter.
|
toString, validateInputNotNull
public AbstractJodaParsingProcessor()
public AbstractJodaParsingProcessor(CellProcessor next)
next
- the next processor in the chainNullPointerException
- if next is nullpublic AbstractJodaParsingProcessor(DateTimeFormatter formatter)
formatter
- the formatter used for parsingNullPointerException
- if formatter is nullpublic AbstractJodaParsingProcessor(DateTimeFormatter formatter, CellProcessor next)
formatter
- the formatter used for parsingnext
- the next processor in the chainNullPointerException
- if formatter or next is nullpublic Object execute(Object value, CsvContext context)
execute
in interface CellProcessor
value
- the value to be processedcontext
- the CSV contextSuperCsvCellProcessorException
- if value is null or is not a Stringprotected abstract T parse(String string)
string
- the string to parseIllegalArgumentException
- if the string can't be parsedprotected abstract T parse(String string, DateTimeFormatter formatter)
string
- the string to parseformatter
- the formatter to useIllegalArgumentException
- if the string can't be parsedCopyright © 2007–2015 Super CSV. All rights reserved.