Package com.vaadin.flow.data.converter
Class DateToLongConverter
- java.lang.Object
-
- com.vaadin.flow.data.converter.DateToLongConverter
-
- All Implemented Interfaces:
Converter<Date,Long>,Serializable
public class DateToLongConverter extends Object implements Converter<Date,Long>
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DateToLongConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Result<Long>convertToModel(Date value, ValueContext context)Converts the given value from presentation type to model type.DateconvertToPresentation(Long value, ValueContext context)Converts the given value from model type to presentation type.
-
-
-
Method Detail
-
convertToModel
public Result<Long> convertToModel(Date value, ValueContext context)
Description copied from interface:ConverterConverts the given value from presentation type to model type.A converter can optionally use locale to do the conversion.
- Specified by:
convertToModelin interfaceConverter<Date,Long>- Parameters:
value- The value to convert. Can be nullcontext- The value context for the conversion.- Returns:
- The converted value compatible with the source type
-
convertToPresentation
public Date convertToPresentation(Long value, ValueContext context)
Description copied from interface:ConverterConverts the given value from model type to presentation type.A converter can optionally use locale to do the conversion.
- Specified by:
convertToPresentationin interfaceConverter<Date,Long>- Parameters:
value- The value to convert. Can be nullcontext- The value context for the conversion.- Returns:
- The converted value compatible with the source type
-
-