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(org.joda.time.format.PeriodFormatter formatter)
Constructs a new FmtPeriod processor, which formats a Joda
Period as a String using the supplied formatter.
|
FmtPeriod(org.joda.time.format.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) |
toString, validateInputNotNullpublic FmtPeriod()
public FmtPeriod(CellProcessor next)
next - the next processor in the chainNullPointerException - if formatter or next is nullpublic FmtPeriod(org.joda.time.format.PeriodFormatter formatter)
formatter - the formatter to useNullPointerException - if formatter is nullpublic FmtPeriod(org.joda.time.format.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)
SuperCsvCellProcessorException - if value is null or not a PeriodCopyright © 2007-2015 Super CSV. All Rights Reserved.