Class DefaultAmountFormatter
- java.lang.Object
-
- de.hybris.platform.accountsummaryaddon.formatters.impl.DefaultAmountFormatter
-
- All Implemented Interfaces:
AmountFormatter
public class DefaultAmountFormatter extends java.lang.Object implements AmountFormatter
-
-
Constructor Summary
Constructors Constructor Description DefaultAmountFormatter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.text.DecimalFormatadjustDigits(java.text.DecimalFormat format, CurrencyModel currencyModel)AdjustsDecimalFormat's fraction digits according to givenCurrencyModel.protected static java.text.DecimalFormatadjustSymbol(java.text.DecimalFormat format, CurrencyModel currencyModel)AdjustsDecimalFormat's symbol according to givenCurrencyModel.protected static java.text.NumberFormatcreateCurrencyFormat(java.util.Locale locale, CurrencyModel currency)java.lang.StringformatAmount(java.math.BigDecimal value, CurrencyModel currency, java.util.Locale locale)
-
-
-
Method Detail
-
formatAmount
public java.lang.String formatAmount(java.math.BigDecimal value, CurrencyModel currency, java.util.Locale locale)- Specified by:
formatAmountin interfaceAmountFormatter
-
createCurrencyFormat
protected static java.text.NumberFormat createCurrencyFormat(java.util.Locale locale, CurrencyModel currency)
-
adjustDigits
protected static java.text.DecimalFormat adjustDigits(java.text.DecimalFormat format, CurrencyModel currencyModel)AdjustsDecimalFormat's fraction digits according to givenCurrencyModel.
-
adjustSymbol
protected static java.text.DecimalFormat adjustSymbol(java.text.DecimalFormat format, CurrencyModel currencyModel)AdjustsDecimalFormat's symbol according to givenCurrencyModel.
-
-