public class ParsePeriod extends CellProcessorAdaptor
For constructors using PeriodFormatter, refer to the following Joda classes:
PeriodFormat
- formats by pattern and styleISOPeriodFormat
- ISO8601 formatsPeriodFormatterBuilder
- complex formats created via method calls
By default, converts from Strings in the ISO8601 duration format.
For example, "PT6H3M7S" represents 6 hours, 3 minutes, 7 seconds.
next
Constructor and Description |
---|
ParsePeriod()
Constructs a new ParsePeriod processor, which parses a String as
a Joda Period.
|
ParsePeriod(CellProcessor next)
Constructs a new ParsePeriod processor, which parses a String as
a Joda Period, then calls the next processor in the chain.
|
ParsePeriod(PeriodFormatter formatter)
Constructs a new ParsePeriod processor, which parses a String as
a Joda Period using the supplied formatter.
|
ParsePeriod(PeriodFormatter formatter,
CellProcessor next)
Constructs a new ParsePeriod processor, which parses a String as
a Joda Period 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.
|
toString, validateInputNotNull
public ParsePeriod()
public ParsePeriod(CellProcessor next)
next
- the next processor in the chainNullPointerException
- if next is nullpublic ParsePeriod(PeriodFormatter formatter)
formatter
- the formatter used for parsingNullPointerException
- if formatter is nullpublic ParsePeriod(PeriodFormatter 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)
value
- the value to be processedcontext
- the CSV contextSuperCsvCellProcessorException
- if value is null or is not a StringCopyright © 2007–2015 Super CSV. All rights reserved.