You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.flow.data.converter.

Class IntegerToDoubleConverter

java.lang.Object
com.vaadin.flow.data.converter.IntegerToDoubleConverter

All Implemented Interfaces:

Converter<Integer,Double>, Serializable

public class IntegerToDoubleConverter extends Object implements Converter<Integer,Double>

A converter that converts from Integer to Double and back.

Since:

24.5

Author:

Vaadin Ltd

See Also:

  • Constructor Details

    • IntegerToDoubleConverter

      public IntegerToDoubleConverter()
  • Method Details

    • convertToModel

      public Result<Double> convertToModel(Integer value, ValueContext context)

      Description copied from interface: Converter

      Converts the given value from presentation type to model type.

      A converter can optionally use locale to do the conversion.

      Specified by:

      convertToModel in interface Converter<Integer,Double>

      Parameters:

      value - The value to convert. Can be null

      context - The value context for the conversion.

      Returns:

      The converted value compatible with the source type

    • convertToPresentation

      public Integer convertToPresentation(Double value, ValueContext context)

      Description copied from interface: Converter

      Converts the given value from model type to presentation type.

      A converter can optionally use locale to do the conversion.

      Specified by:

      convertToPresentation in interface Converter<Integer,Double>

      Parameters:

      value - The value to convert. Can be null

      context - The value context for the conversion.

      Returns:

      The converted value compatible with the source type