T
- the TemporalAccessor
type that the processor returnspublic abstract class AbstractTemporalAccessorParsingProcessor<T extends TemporalAccessor> extends CellProcessorAdaptor implements StringCellProcessor
TemporalAccessor
types.next
Constructor and Description |
---|
AbstractTemporalAccessorParsingProcessor()
Constructs a new AbstractTemporalAccessorParsingProcessor processor, which
parses a String as a
TemporalAccessor type. |
AbstractTemporalAccessorParsingProcessor(CellProcessor next)
Constructs a new AbstractTemporalAccessorParsingProcessor processor, which
parses a String as a
TemporalAccessor type, then calls the next processor in the
chain. |
AbstractTemporalAccessorParsingProcessor(DateTimeFormatter formatter)
Constructs a new AbstractTemporalAccessorParsingProcessor processor, which
parses a String as a
TemporalAccessor type using the supplied formatter. |
AbstractTemporalAccessorParsingProcessor(DateTimeFormatter formatter,
CellProcessor next)
Constructs a new AbstractTemporalAccessorParsingProcessor processor, which
parses a String as a
TemporalAccessor 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
TemporalAccessor type. |
protected abstract T |
parse(String string,
DateTimeFormatter formatter)
Parses the String into the appropriate
TemporalAccessor type, using the supplied
formatter. |
toString, validateInputNotNull
public AbstractTemporalAccessorParsingProcessor()
TemporalAccessor
type.public AbstractTemporalAccessorParsingProcessor(CellProcessor next)
TemporalAccessor
type, then calls the next processor in the
chain.next
- the next processor in the chainNullPointerException
- if next is nullpublic AbstractTemporalAccessorParsingProcessor(DateTimeFormatter formatter)
TemporalAccessor
type using the supplied formatter.formatter
- the formatter used for parsingNullPointerException
- if formatter is nullpublic AbstractTemporalAccessorParsingProcessor(DateTimeFormatter formatter, CellProcessor next)
TemporalAccessor
type using the supplied formatter, then calls
the next processor in the chain.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)
TemporalAccessor
type.string
- the string to parseTemporalAccessor
typeIllegalArgumentException
- if the string can't be parsedprotected abstract T parse(String string, DateTimeFormatter formatter)
TemporalAccessor
type, using the supplied
formatter.string
- the string to parseformatter
- the formatter to useTemporalAccessor
typeIllegalArgumentException
- if the string can't be parsedCopyright © 2007–2015 Super CSV. All rights reserved.