Class AbstractJavaTimeConverter<T extends Temporal>
java.lang.Object
org.apache.wicket.util.convert.converter.AbstractConverter<T>
org.apache.wicket.util.convert.converter.AbstractJavaTimeConverter<T>
- Type Parameters:
T
- the type of the Temporal that is supported by this converter
- All Implemented Interfaces:
Serializable
,IConverter<T>
,IClusterable
- Direct Known Subclasses:
LocalDateConverter
,LocalDateTimeConverter
,LocalTimeConverter
,ZonedDateTimeConverter
A base class for all java.time.** related converters
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToObject
(String value, Locale locale) Converts the givenString
valueconvertToString
(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 longprotected abstract DateTimeFormatter
getDateTimeFormatter
(Locale locale) Methods inherited from class org.apache.wicket.util.convert.converter.AbstractConverter
getTargetType, newConversionException, parse
-
Constructor Details
-
AbstractJavaTimeConverter
public AbstractJavaTimeConverter()
-
-
Method Details
-
createTemporal
Creates a new instance of D out of the passed date(time) as long- Parameters:
temporalAccessor
- the date(time) in millis since Epoch- Returns:
- a new instance of the specific type D
-
convertToObject
Description copied from interface:IConverter
Converts the givenString
value- Parameters:
value
- The string value to convertlocale
- The locale used to convert the value- Returns:
- The converted value
-
convertToString
Description copied from interface:IConverter
Converts the given value to a string.- Specified by:
convertToString
in interfaceIConverter<T extends Temporal>
- Overrides:
convertToString
in classAbstractConverter<T extends Temporal>
- Parameters:
value
- The value to convertlocale
- The locale used to convert the value- Returns:
- The converted string value
- See Also:
-
getDateTimeFormatter
- Parameters:
locale
-- Returns:
- Returns the date time format.
-
getDateTimeFormatter
-