public final class ConverterUtil extends Object
Converter types.
It tries to match the best converter to
apply, given the type of the input data to
be converted and the desired output type.Converter| Constructor and Description |
|---|
ConverterUtil() |
| Modifier and Type | Method and Description |
|---|---|
static <T,R> R |
convertData(T value,
Class<R> convertToType)
Converts the
value from its own type T to
convertToType type R using a
Converter if it could find one. |
static <T,R> T |
restoreData(R value,
Class<T> restoreToType)
Restores (by converting) the data from its own type
R to
restoreToType type T using a
Converter if it could find one. |
public static <T,R> R convertData(T value,
Class<R> convertToType)
value from its own type T to
convertToType type R using a
Converter if it could find one.T - convertFromTypeR - convertToTypevalue - data to convertconvertToType - type to convert topublic static <T,R> T restoreData(R value,
Class<T> restoreToType)
throws ParseException
R to
restoreToType type T using a
Converter if it could find one.T - convertFromTypeR - convertToTypevalue - data to restorerestoreToType - type to restore toParseExceptionCopyright © 2016 Omnia Consulting. All rights reserved.