Package lumis.util.converter
Class DelegateToRegisteredConverter
- java.lang.Object
-
- lumis.util.converter.DelegateToRegisteredConverter
-
- All Implemented Interfaces:
IConverter
public class DelegateToRegisteredConverter extends java.lang.Object implements IConverter
This converter just delegates the conversions toConvertUtil.convert(Class, Object, Locale, String)
. If value is null or is instance of destination class, it is returned directly.- Since:
- 4.0.4
- Version:
- $Revision: 6251 $ $Date: 2007-03-27 10:49:29 -0300 (Tue, 27 Mar 2007) $
- See Also:
ConvertUtil.convert(Class, Object, Locale, String)
-
-
Constructor Summary
Constructors Constructor Description DelegateToRegisteredConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
convert(java.lang.Class<T> type, java.lang.Object value)
Converts the specified input object into an output object of the specified type.<T> T
convert(java.lang.Class<T> type, java.lang.Object value, java.util.Locale locale)
Converts the specified input object into an output object of the specified type.<T> T
convert(java.lang.Class<T> type, java.lang.Object value, java.util.Locale locale, java.lang.String pattern)
Converts the specified input object into an output object of the specified type.
-
-
-
Method Detail
-
convert
public <T> T convert(java.lang.Class<T> type, java.lang.Object value, java.util.Locale locale, java.lang.String pattern)
Description copied from interface:IConverter
Converts the specified input object into an output object of the specified type.- Specified by:
convert
in interfaceIConverter
- Type Parameters:
T
- generics support for the data type specified.- Parameters:
type
- data type to which the value should be converted.value
- the input value to be converted.locale
- locale to be used during conversion, if necessary.pattern
- converter specific conversion pattern, to be used during conversion, if necessary.
-
convert
public <T> T convert(java.lang.Class<T> type, java.lang.Object value, java.util.Locale locale)
Description copied from interface:IConverter
Converts the specified input object into an output object of the specified type.- Specified by:
convert
in interfaceIConverter
- Type Parameters:
T
- generics support for the data type specified.- Parameters:
type
- data type to which the value should be converted.value
- the input value to be converted.locale
- locale to be used during conversion
-
convert
public <T> T convert(java.lang.Class<T> type, java.lang.Object value)
Description copied from interface:IConverter
Converts the specified input object into an output object of the specified type.- Specified by:
convert
in interfaceIConverter
- Type Parameters:
T
- generics support for the data type specified.- Parameters:
type
- data type to which the value should be converted.value
- the input value to be converted.
-
-