Class ShortLocaleConverter

All Implemented Interfaces:
Converter<Short>, LocaleConverter<Short>

Standard LocaleConverter implementation that converts an incoming locale-sensitive String into a Short object, optionally using a default value or throwing a ConversionException if a conversion error occurs.
  • Method Details

    • builder

      Constructs a new builder.
      Returns:
      a new builder.
    • parse

      protected Short parse(Object value, String pattern) throws ParseException
      Parses the specified locale-sensitive input object into an output object of the specified type. This method will return values of type Short.
      Overrides:
      parse in class DecimalLocaleConverter<Short>
      Parameters:
      value - The input object to be converted
      pattern - The pattern is used for the conversion
      Returns:
      The converted value
      Throws:
      ConversionException - if conversion cannot be performed successfully
      ParseException - if an error occurs parsing a String to a Number
      Since:
      1.8.0