public class FmtPeriod 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 to a String in the ISO8601 duration format.
For example, "PT6H3M7S" represents 6 hours, 3 minutes, 7 seconds.
next
Constructor and Description |
---|
FmtPeriod()
Constructs a new FmtPeriod processor, which formats a Joda
Period as a String.
|
FmtPeriod(CellProcessor next)
Constructs a new FmtPeriod processor, which formats a Joda
Period as a String, then calls the next processor in the chain.
|
FmtPeriod(PeriodFormatter formatter)
Constructs a new FmtPeriod processor, which formats a Joda
Period as a String using the supplied formatter.
|
FmtPeriod(PeriodFormatter formatter,
CellProcessor next)
Constructs a new FmtPeriod processor, which formats a Joda
Period as a String 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 FmtPeriod()
public FmtPeriod(CellProcessor next)
next
- the next processor in the chainNullPointerException
- if formatter or next is nullpublic FmtPeriod(PeriodFormatter formatter)
formatter
- the formatter to useNullPointerException
- if formatter is nullpublic FmtPeriod(PeriodFormatter formatter, CellProcessor next)
formatter
- the formatter to usenext
- 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 not a PeriodCopyright © 2007–2015 Super CSV. All rights reserved.