T - the type of the Temporal that is supported by this converterpublic abstract class AbstractJavaTimeConverter<T extends Temporal> extends AbstractConverter<T>
| Constructor and Description |
|---|
AbstractJavaTimeConverter() |
| Modifier and Type | Method and Description |
|---|---|
T |
convertToObject(String value,
Locale locale)
Converts the given
String value |
String |
convertToString(T value,
Locale locale)
Converts the given value to a string.
|
protected abstract T |
createTemporal(TemporalAccessor temporalAccessor)
Creates a new instance of D out of the passed date(time) as long
|
protected abstract DateTimeFormatter |
getDateTimeFormatter() |
DateTimeFormatter |
getDateTimeFormatter(Locale locale) |
getTargetType, newConversionException, parseprotected abstract T createTemporal(TemporalAccessor temporalAccessor)
temporalAccessor - the date(time) in millis since Epochpublic T convertToObject(String value, Locale locale)
IConverterString valuevalue - The string value to convertlocale - The locale used to convert the valuepublic String convertToString(T value, Locale locale)
IConverterconvertToString in interface IConverter<T extends Temporal>convertToString in class AbstractConverter<T extends Temporal>value - The value to convertlocale - The locale used to convert the valueIConverter.convertToString(java.lang.Object, Locale)public DateTimeFormatter getDateTimeFormatter(Locale locale)
locale - protected abstract DateTimeFormatter getDateTimeFormatter()
Copyright © 2006–2021 Apache Software Foundation. All rights reserved.