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