Package org.supercsv.cellprocessor.time
Class FmtLocalTime
- java.lang.Object
-
- org.supercsv.cellprocessor.CellProcessorAdaptor
-
- org.supercsv.cellprocessor.time.AbstractTemporalAccessorFormattingProcessor<java.time.LocalTime>
-
- org.supercsv.cellprocessor.time.FmtLocalTime
-
- All Implemented Interfaces:
CellProcessor
public class FmtLocalTime extends AbstractTemporalAccessorFormattingProcessor<java.time.LocalTime>
Converts a LocalTime to a String. For constructors using DateTimeFormatter, refer to the following classes:DateTimeFormatter
- formats by pattern and styleDateTimeFormatter
- ISO 8601 formatsDateTimeFormatterBuilder
- complex formats created via method calls
- Since:
- 2.4.0
-
-
Field Summary
-
Fields inherited from class org.supercsv.cellprocessor.CellProcessorAdaptor
next
-
-
Constructor Summary
Constructors Constructor Description FmtLocalTime()
Constructs a new FmtLocalTime processor, which formats a LocalTime as a String.FmtLocalTime(java.time.format.DateTimeFormatter formatter)
Constructs a new FmtLocalTime processor, which formats a LocalTime as a String using the supplied formatter.FmtLocalTime(java.time.format.DateTimeFormatter formatter, CellProcessor next)
Constructs a new FmtLocalTime processor, which formats a LocalTime as a String using the supplied formatter, then calls the next processor in the chain.FmtLocalTime(CellProcessor next)
Constructs a new FmtLocalTime processor, which formats a LocalTime as a String, then calls the next processor in the chain.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Class<java.time.LocalTime>
getType()
-
Methods inherited from class org.supercsv.cellprocessor.time.AbstractTemporalAccessorFormattingProcessor
execute
-
Methods inherited from class org.supercsv.cellprocessor.CellProcessorAdaptor
toString, validateInputNotNull
-
-
-
-
Constructor Detail
-
FmtLocalTime
public FmtLocalTime()
Constructs a new FmtLocalTime processor, which formats a LocalTime as a String.
-
FmtLocalTime
public FmtLocalTime(CellProcessor next)
Constructs a new FmtLocalTime processor, which formats a LocalTime as a String, then calls the next processor in the chain.- Parameters:
next
- next processor in the chain- Throws:
java.lang.NullPointerException
- if next is null
-
FmtLocalTime
public FmtLocalTime(java.time.format.DateTimeFormatter formatter)
Constructs a new FmtLocalTime processor, which formats a LocalTime as a String using the supplied formatter.- Parameters:
formatter
- the formatter to use- Throws:
java.lang.NullPointerException
- if formatter is null
-
FmtLocalTime
public FmtLocalTime(java.time.format.DateTimeFormatter formatter, CellProcessor next)
Constructs a new FmtLocalTime processor, which formats a LocalTime as a String using the supplied formatter, then calls the next processor in the chain.- Parameters:
formatter
- the formatter to usenext
- the next processor in the chain- Throws:
java.lang.NullPointerException
- if formatter or next is null
-
-
Method Detail
-
getType
protected java.lang.Class<java.time.LocalTime> getType()
- Specified by:
getType
in classAbstractTemporalAccessorFormattingProcessor<java.time.LocalTime>
- Returns:
- the type formatted by this subclass
-
-