Class ShortLocaleConverter
java.lang.Object
org.apache.commons.beanutils2.locale.BaseLocaleConverter<T>
org.apache.commons.beanutils2.locale.converters.DecimalLocaleConverter<Short>
org.apache.commons.beanutils2.locale.converters.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.-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.commons.beanutils2.locale.BaseLocaleConverter
defaultValue, locale, localizedPattern, pattern, useDefault
-
Method Summary
Methods inherited from class org.apache.commons.beanutils2.locale.BaseLocaleConverter
convert, convert, convert, convert
-
Method Details
-
builder
Constructs a new builder.- Returns:
- a new builder.
-
parse
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 classDecimalLocaleConverter<Short>
- Parameters:
value
- The input object to be convertedpattern
- The pattern is used for the conversion- Returns:
- The converted value
- Throws:
ConversionException
- if conversion cannot be performed successfullyParseException
- if an error occurs parsing a String to a Number- Since:
- 1.8.0
-