Package org.apache.ofbiz.base.conversion
Class NumberConverters.AbstractStringToNumberConverter<N extends java.lang.Number>
- java.lang.Object
-
- org.apache.ofbiz.base.conversion.AbstractConverter<S,T>
-
- org.apache.ofbiz.base.conversion.AbstractLocalizedConverter<S,T>
-
- org.apache.ofbiz.base.conversion.NumberConverters.AbstractNumberConverter<java.lang.String,N>
-
- org.apache.ofbiz.base.conversion.NumberConverters.AbstractStringToNumberConverter<N>
-
- All Implemented Interfaces:
Converter<java.lang.String,N>
,ConverterLoader
,LocalizedConverter<java.lang.String,N>
- Direct Known Subclasses:
NumberConverters.StringToBigDecimal
,NumberConverters.StringToBigInteger
,NumberConverters.StringToDouble
,NumberConverters.StringToFloat
,NumberConverters.StringToInteger
,NumberConverters.StringToLong
- Enclosing class:
- NumberConverters
public abstract static class NumberConverters.AbstractStringToNumberConverter<N extends java.lang.Number> extends NumberConverters.AbstractNumberConverter<java.lang.String,N>
-
-
Constructor Summary
Constructors Constructor Description AbstractStringToNumberConverter(java.lang.Class<N> targetClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract N
convert(java.lang.Number number)
N
convert(java.lang.String obj, java.util.Locale locale, java.util.TimeZone timeZone)
Convertsobj
toT
.-
Methods inherited from class org.apache.ofbiz.base.conversion.NumberConverters.AbstractNumberConverter
convert
-
Methods inherited from class org.apache.ofbiz.base.conversion.AbstractLocalizedConverter
convert, convert
-
Methods inherited from class org.apache.ofbiz.base.conversion.AbstractConverter
canConvert, convert, getSourceClass, getTargetClass, loadConverters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.ofbiz.base.conversion.Converter
canConvert, convert, convert, getSourceClass, getTargetClass
-
-
-
-
Constructor Detail
-
AbstractStringToNumberConverter
public AbstractStringToNumberConverter(java.lang.Class<N> targetClass)
-
-
Method Detail
-
convert
public N convert(java.lang.String obj, java.util.Locale locale, java.util.TimeZone timeZone) throws ConversionException
Description copied from interface:LocalizedConverter
Convertsobj
toT
.- Parameters:
obj
- The sourceObject
to convertlocale
- The locale used for conversion - must not benull
timeZone
- The time zone used for conversion - must not benull
- Returns:
- The converted
Object
- Throws:
ConversionException
-
convert
protected abstract N convert(java.lang.Number number) throws ConversionException
- Throws:
ConversionException
-
-