Class DecimalLocaleConverter<T extends Number>
java.lang.Object
org.apache.commons.beanutils2.locale.BaseLocaleConverter<T>
org.apache.commons.beanutils2.locale.converters.DecimalLocaleConverter<T>
- Type Parameters:
- T- The converter type.
- All Implemented Interfaces:
- Converter<T>,- LocaleConverter<T>
- Direct Known Subclasses:
- BigDecimalLocaleConverter,- BigIntegerLocaleConverter,- ByteLocaleConverter,- DoubleLocaleConverter,- FloatLocaleConverter,- IntegerLocaleConverter,- LongLocaleConverter,- ShortLocaleConverter
Standard 
LocaleConverter implementation that converts an incoming locale-sensitive String into a Number object, optionally using a default
 value or throwing a ConversionException if a conversion error occurs.- Since:
- 1.7
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classDecimalLocaleConverter.Builder<B extends DecimalLocaleConverter.Builder<B,T>, T extends Number> Builds instances ofDateLocaleConverter.
- 
Field SummaryFields inherited from class org.apache.commons.beanutils2.locale.BaseLocaleConverterdefaultValue, locale, localizedPattern, pattern, useDefault
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDecimalLocaleConverter(T defaultValue, Locale locale, String pattern, boolean useDefault, boolean locPattern) Constructs a new instance.
- 
Method SummaryMethods inherited from class org.apache.commons.beanutils2.locale.BaseLocaleConverterconvert, convert, convert, convert
- 
Constructor Details- 
DecimalLocaleConverterprotected DecimalLocaleConverter(T defaultValue, Locale locale, String pattern, boolean useDefault, boolean locPattern) Constructs a new instance.- Parameters:
- defaultValue- default value.
- locale- locale.
- pattern- pattern.
- useDefault- use the default.
- locPattern- localized pattern.
 
 
- 
- 
Method Details- 
builderConstructs a new builder.- Type Parameters:
- B- The builder type.
- T- The Number type.
- Returns:
- a new builder.
 
- 
parseConverts the specified locale-sensitive input object into an output object of the specified type.- Specified by:
- parsein class- BaseLocaleConverter<T extends Number>
- 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
 
 
-