Home
last modified time | relevance | path

Searched refs:currency (Results 1 – 9 of 9) sorted by relevance

/libcore/luni/src/main/java/java/text/
DDecimalFormatSymbols.java56 private transient Currency currency; field in DecimalFormatSymbols
104 currency = Currency.getInstance(locale); in DecimalFormatSymbols()
105 currencySymbol = currency.getSymbol(locale); in DecimalFormatSymbols()
106 intlCurrencySymbol = currency.getCurrencyCode(); in DecimalFormatSymbols()
108 currency = Currency.getInstance("XXX"); in DecimalFormatSymbols()
179 return currency.equals(obj.currency) && in equals()
199 "[currency=" + currency + in toString()
232 return currency; in getCurrency()
413 public void setCurrency(Currency currency) { in setCurrency() argument
414 if (currency == null) { in setCurrency()
[all …]
DDecimalFormat.java902 public void setCurrency(Currency currency) { in setCurrency() argument
903 Currency instance = Currency.getInstance(currency.getCurrencyCode()); in setCurrency()
905 ndf.setCurrency(symbols.getCurrencySymbol(), currency.getCurrencyCode()); in setCurrency()
DNumberFormat.java606 public void setCurrency(Currency currency) { in setCurrency() argument
/libcore/luni/src/main/java/java/util/
DCurrency.java52 Currency currency = codesToCurrencies.get(currencyCode); in getInstance() local
53 if (currency == null) { in getInstance()
54 currency = new Currency(currencyCode); in getInstance()
55 codesToCurrencies.put(currencyCode, currency); in getInstance()
57 return currency; in getInstance()
71 Currency currency = localesToCurrencies.get(locale); in getInstance() local
72 if (currency != null) { in getInstance()
73 return currency; in getInstance()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DDecimalFormatSymbolsTest.java118 Currency currency = Currency.getInstance("USD"); in test_getCurrency() local
120 dfsUS.getCurrency(), currency); in test_getCurrency()
295 Currency currency = Currency.getInstance("JPY"); in test_setCurrencyLjava_util_Currency() local
296 dfs.setCurrency(currency); in test_setCurrencyLjava_util_Currency()
298 assertTrue("Returned incorrect currency", currency == dfs.getCurrency()); in test_setCurrencyLjava_util_Currency()
299 assertEquals("Returned incorrect currency symbol", currency.getSymbol( in test_setCurrencyLjava_util_Currency()
301 assertTrue("Returned incorrect international currency symbol", currency in test_setCurrencyLjava_util_Currency()
371 Currency currency = Currency.getInstance("JPY"); in test_setInternationalCurrencySymbolLjava_lang_String() local
372 dfs.setInternationalCurrencySymbol(currency.getCurrencyCode()); in test_setInternationalCurrencySymbolLjava_lang_String()
374 assertTrue("Test1: Returned incorrect currency", currency == dfs in test_setInternationalCurrencySymbolLjava_lang_String()
[all …]
DDecimalFormatTest.java1891 Currency currency = Currency.getInstance("AED"); in test_setCurrency() local
1892 df.setCurrency(currency); in test_setCurrency()
1893 assertTrue("Returned incorrect currency", currency == df.getCurrency()); in test_setCurrency()
1894 assertEquals("Returned incorrect currency symbol", currency.getSymbol(locale), in test_setCurrency()
1896 assertEquals("Returned incorrect international currency symbol", currency.getCurrencyCode(), in test_setCurrency()
/libcore/luni/src/test/java/libcore/java/text/
DDecimalFormatTest.java289 Currency currency = Currency.getInstance("CNY"); in testSetCurrency_symbolOrigin() local
292 String locale1Symbol = currency.getSymbol(locale1); in testSetCurrency_symbolOrigin()
293 String locale2Symbol = currency.getSymbol(locale2); in testSetCurrency_symbolOrigin()
302 formatArbitraryCurrencyAmountInLocale(currency, locale2); in testSetCurrency_symbolOrigin()
306 formatArbitraryCurrencyAmountInLocale(currency, locale2); in testSetCurrency_symbolOrigin()
316 private String formatArbitraryCurrencyAmountInLocale(Currency currency, Locale locale) { in formatArbitraryCurrencyAmountInLocale() argument
318 localeCurrencyFormat.setCurrency(currency); in formatArbitraryCurrencyAmountInLocale()
/libcore/luni/src/test/java/libcore/java/util/
DCurrencyTest.java84 Currency currency = Currency.getInstance(Locale.getDefault()); in test_nullLocales() local
86 currency.getSymbol(null); in test_nullLocales()
/libcore/luni/src/main/native/
Dlibcore_icu_ICU.cpp152 …ScopedResourceBundle currency(ures_getByKey(currencyMap.get(), countryCode.c_str(), NULL, &status)… in ICU_getCurrencyCode() local
157 ScopedResourceBundle currencyElem(ures_getByIndex(currency.get(), 0, NULL, &status)); in ICU_getCurrencyCode()