P
- the presentation type. Must be compatible with what
getPresentationType()
returns.M
- the model type. Must be compatible with what
getModelType()
returns.public static interface DataGrid.Converter<P,M>
Modifier and Type | Method and Description |
---|---|
M |
convertToModel(P value,
java.lang.Class<? extends M> targetType,
java.util.Locale locale)
Converts the given value from target type to source type.
|
P |
convertToPresentation(M value,
java.lang.Class<? extends P> targetType,
java.util.Locale locale)
Converts the given value from source type to target type.
|
java.lang.Class<M> |
getModelType()
The source type of the converter.
|
java.lang.Class<P> |
getPresentationType()
The target type of the converter.
|
M convertToModel(P value, java.lang.Class<? extends M> targetType, java.util.Locale locale)
value
- the value to convert, compatible with the target type.
Can be nulltargetType
- the requested type of the return valuelocale
- the locale to use for conversion. Can be nullP convertToPresentation(M value, java.lang.Class<? extends P> targetType, java.util.Locale locale)
value
- the value to convert, compatible with the target type.
Can be nulltargetType
- the requested type of the return valuelocale
- the locale to use for conversion. Can be nulljava.lang.Class<M> getModelType()
convertToPresentation(Object, Class, Locale)
.java.lang.Class<P> getPresentationType()
convertToModel(Object, Class, Locale)
.