public class LocalDateToDateConverter extends Object implements Converter<LocalDate,Date>
LocalDate and
Date.| Constructor and Description |
|---|
LocalDateToDateConverter()
Creates a new converter using the system's default time zone.
|
LocalDateToDateConverter(ZoneId zoneId)
Creates a new converter using the given time zone.
|
| Modifier and Type | Method and Description |
|---|---|
Result<Date> |
convertToModel(LocalDate localDate,
ValueContext context)
Converts the given value from presentation type to model type.
|
LocalDate |
convertToPresentation(Date date,
ValueContext context)
Converts the given value from model type to presentation type.
|
public LocalDateToDateConverter(ZoneId zoneId)
zoneId - the time zone id to use, not nullpublic LocalDateToDateConverter()
ZoneId.systemDefault()public Result<Date> convertToModel(LocalDate localDate, ValueContext context)
ConverterA converter can optionally use locale to do the conversion.
convertToModel in interface Converter<LocalDate,Date>localDate - The value to convert. Can be nullcontext - The value context for the conversion.public LocalDate convertToPresentation(Date date, ValueContext context)
ConverterA converter can optionally use locale to do the conversion.
convertToPresentation in interface Converter<LocalDate,Date>date - The value to convert. Can be nullcontext - The value context for the conversion.Copyright © 2025. All rights reserved.