Object CurrencyUtils
-
- All Implemented Interfaces:
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) public class CurrencyUtils
-
-
Field Summary
Fields Modifier and Type Field Description public final static CurrencyUtilsINSTANCE
-
Method Summary
Modifier and Type Method Description final StringformatAmount(Amount amount, Locale locale)Format the Amount to be displayed to the user based on the Locale. final UnitassertCurrency(String currencyCode)-
-
Method Detail
-
formatAmount
final String formatAmount(Amount amount, Locale locale)
Format the Amount to be displayed to the user based on the Locale.
- Parameters:
amount- The amount with currency and value.locale- The locale the amount will be formatted with.- Returns:
A formatted string displaying currency and value.
-
assertCurrency
final Unit assertCurrency(String currencyCode)
-
-
-
-