|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object lumis.util.converter.ConverterDefaultParameterDecorator
public class ConverterDefaultParameterDecorator
Decorates a IConverter
allowing to define default parameters that are
used when not specified.
Constructor Summary | |
---|---|
ConverterDefaultParameterDecorator(IConverter converter,
Locale defaultLocale,
String defaultPattern)
Creates a new decorator for the given converter that uses the default parameters given. |
Method Summary | ||
---|---|---|
|
convert(Class<T> type,
Object value)
Converts the specified input object into an output object of the specified type. |
|
|
convert(Class<T> type,
Object value,
Locale locale)
Converts the specified input object into an output object of the specified type. |
|
|
convert(Class<T> type,
Object value,
Locale locale,
String pattern)
Converts the specified input object into an output object of the specified type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConverterDefaultParameterDecorator(IConverter converter, Locale defaultLocale, String defaultPattern)
converter
- the converter to be decorated.defaultLocale
- the default locale to use when the locale is not specified.defaultPattern
- the default pattern to use when the pattern is not specified.Method Detail |
---|
public <T> T convert(Class<T> type, Object value, Locale locale, String pattern)
IConverter
convert
in interface IConverter
T
- generics support for the data type specified.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.public <T> T convert(Class<T> type, Object value, Locale locale)
IConverter
convert
in interface IConverter
T
- generics support for the data type specified.type
- data type to which the value should be converted.value
- the input value to be converted.locale
- locale to be used during conversionpublic <T> T convert(Class<T> type, Object value)
IConverter
convert
in interface IConverter
T
- generics support for the data type specified.type
- data type to which the value should be converted.value
- the input value to be converted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |