Package com.vaadin.flow.data.converter
Class BigDecimalToIntegerConverter
java.lang.Object
com.vaadin.flow.data.converter.BigDecimalToIntegerConverter
- All Implemented Interfaces:
Converter<BigDecimal,,Integer> Serializable
A converter that converts from
BigDecimal to Integer and
back.- Since:
- 24.5
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertToModel(BigDecimal value, ValueContext context) Converts the given value from presentation type to model type.convertToPresentation(Integer value, ValueContext context) Converts the given value from model type to presentation type.
-
Constructor Details
-
BigDecimalToIntegerConverter
public BigDecimalToIntegerConverter()
-
-
Method Details
-
convertToModel
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<BigDecimal,Integer> - 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
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<BigDecimal,Integer> - Parameters:
value- The value to convert. Can be nullcontext- The value context for the conversion.- Returns:
- The converted value compatible with the source type
-