Package org.apache.ofbiz.base.conversion
Interface LocalizedConverter<S,T>
-
- All Superinterfaces:
Converter<S,T>
- All Known Implementing Classes:
AbstractLocalizedConverter
,DateTimeConverters.DateToCalendar
,DateTimeConverters.DateToString
,DateTimeConverters.GenericLocalizedConverter
,DateTimeConverters.LongToCalendar
,DateTimeConverters.SqlDateToString
,DateTimeConverters.SqlTimeToString
,DateTimeConverters.StringToCalendar
,DateTimeConverters.StringToDate
,DateTimeConverters.StringToDuration
,DateTimeConverters.StringToSqlDate
,DateTimeConverters.StringToSqlTime
,DateTimeConverters.StringToTimestamp
,DateTimeConverters.TimestampToString
,NumberConverters.AbstractNumberConverter
,NumberConverters.AbstractNumberToStringConverter
,NumberConverters.AbstractStringToNumberConverter
,NumberConverters.BigDecimalToString
,NumberConverters.BigIntegerToString
,NumberConverters.ByteToString
,NumberConverters.DoubleToString
,NumberConverters.FloatToString
,NumberConverters.IntegerToString
,NumberConverters.LongToString
,NumberConverters.ShortToString
,NumberConverters.StringToBigDecimal
,NumberConverters.StringToBigInteger
,NumberConverters.StringToDouble
,NumberConverters.StringToFloat
,NumberConverters.StringToInteger
,NumberConverters.StringToLong
public interface LocalizedConverter<S,T> extends Converter<S,T>
Localized converter interface. Classes implement this interface to convert one object type to another. Methods are provided to localize the conversion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
convert(java.lang.Class<? extends T> targetClass, S obj, java.util.Locale locale, java.util.TimeZone timeZone)
Convertsobj
toT
.T
convert(java.lang.Class<? extends T> targetClass, S obj, java.util.Locale locale, java.util.TimeZone timeZone, java.lang.String formatString)
Convertsobj
toT
.T
convert(S obj, java.util.Locale locale, java.util.TimeZone timeZone)
Convertsobj
toT
.T
convert(S obj, java.util.Locale locale, java.util.TimeZone timeZone, java.lang.String formatString)
Convertsobj
toT
.-
Methods inherited from interface org.apache.ofbiz.base.conversion.Converter
canConvert, convert, convert, getSourceClass, getTargetClass
-
-
-
-
Method Detail
-
convert
T convert(S obj, java.util.Locale locale, java.util.TimeZone timeZone) throws ConversionException
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
T convert(java.lang.Class<? extends T> targetClass, S obj, java.util.Locale locale, java.util.TimeZone timeZone) throws ConversionException
Convertsobj
toT
.- Parameters:
targetClass
- TheClass
to convert toobj
- 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
T convert(S obj, java.util.Locale locale, java.util.TimeZone timeZone, java.lang.String formatString) throws ConversionException
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
formatString
- Optional formatting string- Returns:
- The converted
Object
- Throws:
ConversionException
-
convert
T convert(java.lang.Class<? extends T> targetClass, S obj, java.util.Locale locale, java.util.TimeZone timeZone, java.lang.String formatString) throws ConversionException
Convertsobj
toT
.- Parameters:
targetClass
- TheClass
to convert toobj
- The sourceObject
to convertlocale
- The locale used for conversion - must not benull
timeZone
- The time zone used for conversion - must not benull
formatString
- Optional formatting string- Returns:
- The converted
Object
- Throws:
ConversionException
-
-