com.vaadin.flow.data.converter.

Class IntegerToLongConverter

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

All Implemented Interfaces:

Converter<Integer,Long>, Serializable

public class IntegerToLongConverter extends Object implements Converter<Integer,Long>

A converter that converts from Integer to Long and back.

See Also:

  • Constructor Details

    • IntegerToLongConverter

      public IntegerToLongConverter()
  • Method Details

    • convertToModel

      public Result<Long> 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,Long>

      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(Long 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,Long>

      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