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

Class StringToIntegerConverter

    • Constructor Detail

      • StringToIntegerConverter

        public StringToIntegerConverter​(String errorMessage)

        Creates a new converter instance with the given error message. Empty strings are converted to null.

        Parameters:

        errorMessage - the error message to use if conversion fails

      • StringToIntegerConverter

        public StringToIntegerConverter​(Integer emptyValue,
                                        String errorMessage)

        Creates a new converter instance with the given presentation value for empty string and error message.

        Parameters:

        emptyValue - the presentation value to return when converting an empty string, may be null

        errorMessage - the error message to use if conversion fails

      • StringToIntegerConverter

        public StringToIntegerConverter​(ErrorMessageProvider errorMessageProvider)

        Creates a new converter instance with the given error message provider. Empty strings are converted to null.

        Parameters:

        errorMessageProvider - the error message provider to use if conversion fails

      • StringToIntegerConverter

        public StringToIntegerConverter​(Integer emptyValue,
                                        ErrorMessageProvider errorMessageProvider)

        Creates a new converter instance with the given presentation value for empty string and error message provider.

        Parameters:

        emptyValue - the presentation value to return when converting an empty string, may be null

        errorMessageProvider - the error message provider to use if conversion fails