public class ValueFormatTranslatorImpl extends Object implements ValueFormatTranslator
ValueFormatTranslator.| Constructor and Description |
|---|
ValueFormatTranslatorImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected DecimalFormat |
createFormatterForService() |
protected DecimalFormat |
createFormatterForUI(Locale locale) |
String |
format(CsticModel cstic,
String value)
Converts a characteristic value into an external format suitable for UI-Display.
|
String |
format(UiType uiType,
String value)
Deprecated.
Replaced by format(CsticModel cstic, String value)
|
protected String |
formatNumeric(String value) |
I18NService |
getI18NService() |
protected Locale |
getLocale() |
boolean |
isNumericCsticType(CsticModel model)
Checks the characteristic model whether it is either of type float or integer
|
String |
parse(UiType uiType,
String value)
Converts a characteristic value into an internal format, which is used by the underlying API's.
|
protected String |
parseNumeric(String value) |
void |
setI18NService(I18NService i18nService) |
public String parse(UiType uiType, String value)
ValueFormatTranslatorparse in interface ValueFormatTranslatoruiType - UI type the characteristic value belongs tovalue - characteristic value in external formatprotected Locale getLocale()
protected DecimalFormat createFormatterForUI(Locale locale)
protected DecimalFormat createFormatterForService()
@Deprecated public String format(UiType uiType, String value)
format in interface ValueFormatTranslatorpublic String format(CsticModel cstic, String value)
ValueFormatTranslatorformat in interface ValueFormatTranslatorcstic - characteristic the value belongs tovalue - characteristic value in internal formatpublic boolean isNumericCsticType(CsticModel model)
ValueFormatTranslatorisNumericCsticType in interface ValueFormatTranslatormodel - characteristic to be checkedpublic void setI18NService(I18NService i18nService)
i18nService - the i18NService to setpublic I18NService getI18NService()
Copyright © 2017 SAP SE. All Rights Reserved.