public class DesignEnumConverter<T extends Enum> extends Object implements Converter<String,T>
DesignAttributeHandler to
use internally.| Constructor and Description |
|---|
DesignEnumConverter(Class<T> type)
Creates a converter for the given enum type.
|
| Modifier and Type | Method and Description |
|---|---|
Result<T> |
convertToModel(String value,
ValueContext context)
Converts the given value from model type to presentation type.
|
String |
convertToPresentation(T value,
ValueContext context)
Converts the given value from presentation type to model type.
|
public Result<T> convertToModel(String value, ValueContext context)
ConverterA converter can optionally use locale to do the conversion.
convertToModel in interface Converter<String,T extends Enum>value - The value to convert. Can be nullcontext - The value context for the conversion.public String convertToPresentation(T value, ValueContext context)
ConverterA converter can optionally use locale to do the conversion.
convertToPresentation in interface Converter<String,T extends Enum>value - The value to convert. Can be nullcontext - The value context for the conversion.Copyright © 2018 Vaadin Ltd. All rights reserved.