Class ParameterConverters.NumberConverter

All Implemented Interfaces:
ParameterConverters.ParameterConverter<String,Number>
Enclosing class:
ParameterConverters

public static class ParameterConverters.NumberConverter extends ParameterConverters.FromStringParameterConverter<Number>
Converts values to numbers, supporting any subclass of Number (including generic Number type), and it unboxed counterpart, using a NumberFormat to parse to a Number and to convert it to a specific number type: If no number format is provided, it defaults to NumberFormat.getInstance().

The localized instance NumberFormat.getInstance(Locale) can be used to convert numbers in specific locales.