Package org.apache.ofbiz.base.conversion
Class NumberConverters.AbstractNumberToStringConverter<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<N,java.lang.String>
-
- org.apache.ofbiz.base.conversion.NumberConverters.AbstractNumberToStringConverter<N>
-
- All Implemented Interfaces:
Converter<N,java.lang.String>
,ConverterLoader
,LocalizedConverter<N,java.lang.String>
- Direct Known Subclasses:
NumberConverters.BigDecimalToString
,NumberConverters.BigIntegerToString
,NumberConverters.ByteToString
,NumberConverters.DoubleToString
,NumberConverters.FloatToString
,NumberConverters.IntegerToString
,NumberConverters.LongToString
,NumberConverters.ShortToString
- Enclosing class:
- NumberConverters
public abstract static class NumberConverters.AbstractNumberToStringConverter<N extends java.lang.Number> extends NumberConverters.AbstractNumberConverter<N,java.lang.String>
-
-
Constructor Summary
Constructors Constructor Description AbstractNumberToStringConverter(java.lang.Class<N> sourceClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
convert(N obj)
Convertsobj
toT
.java.lang.String
convert(N obj, java.util.Locale locale, java.util.TimeZone timeZone)
Convertsobj
toT
.protected abstract java.lang.String
format(N obj, java.text.NumberFormat nf)
-
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, getSourceClass, getTargetClass
-
-
-
-
Constructor Detail
-
AbstractNumberToStringConverter
public AbstractNumberToStringConverter(java.lang.Class<N> sourceClass)
-
-
Method Detail
-
convert
public java.lang.String convert(N obj) throws ConversionException
Description copied from interface:Converter
Convertsobj
toT
.- Parameters:
obj
- The sourceObject
to convert- Returns:
- The converted
Object
- Throws:
ConversionException
-
convert
public java.lang.String convert(N 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
-
format
protected abstract java.lang.String format(N obj, java.text.NumberFormat nf) throws ConversionException
- Throws:
ConversionException
-
-