Class BigDecimalLocaleConverter
java.lang.Object
org.apache.commons.beanutils2.locale.BaseLocaleConverter<T>
org.apache.commons.beanutils2.locale.converters.DecimalLocaleConverter<BigDecimal>
org.apache.commons.beanutils2.locale.converters.BigDecimalLocaleConverter
- All Implemented Interfaces:
Converter<BigDecimal>
,LocaleConverter<BigDecimal>
Standard
LocaleConverter
implementation that converts an incoming locale-sensitive String into a
BigDecimal
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
Modifier and TypeMethodDescriptionbuilder()
Constructs a new builder.protected BigDecimal
Parses the specified locale-sensitive input object into an output object of BigDecimal type.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 BigDecimal type.- Overrides:
parse
in classDecimalLocaleConverter<BigDecimal>
- 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
-