Home
last modified time | relevance | path

Searched refs:Currency (Results 1 – 25 of 154) sorted by relevance

1234567

/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/util/
DCurrencyTest.java37 import ohos.global.icu.util.Currency;
55 Currency usd = Currency.getInstance("USD"); in TestAPI()
57 Currency jpy = Currency.getInstance("JPY"); in TestAPI()
58 Currency jpy2 = Currency.getInstance("jpy"); in TestAPI()
79 Currency nullCurrency = Currency.getInstance((String)null); in TestAPI()
87 Currency bogusCurrency = Currency.getInstance("BOGUS"); in TestAPI()
94 Locale[] avail = Currency.getAvailableLocales(); in TestAPI()
113 final Currency jpy = Currency.getInstance("JPY"); in TestRegistration()
114 final Currency usd = Currency.getInstance(Locale.US); in TestRegistration()
117 Currency.unregister(null); // should fail, coverage in TestRegistration()
[all …]
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
DCurrencyTest.java36 import com.ibm.icu.util.Currency;
52 Currency usd = Currency.getInstance("USD"); in TestAPI()
54 Currency jpy = Currency.getInstance("JPY"); in TestAPI()
55 Currency jpy2 = Currency.getInstance("jpy"); in TestAPI()
76 Currency nullCurrency = Currency.getInstance((String)null); in TestAPI()
84 Currency bogusCurrency = Currency.getInstance("BOGUS"); in TestAPI()
91 Locale[] avail = Currency.getAvailableLocales(); in TestAPI()
110 final Currency jpy = Currency.getInstance("JPY"); in TestRegistration()
111 final Currency usd = Currency.getInstance(Locale.US); in TestRegistration()
114 Currency.unregister(null); // should fail, coverage in TestRegistration()
[all …]
/third_party/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DCompactDecimalFormatTest.java38 import com.ibm.icu.util.Currency;
171 {new CurrencyAmount(1f, Currency.getInstance("CNY")), "¥1"},
172 {new CurrencyAmount(12f, Currency.getInstance("CNY")), "¥12"},
173 {new CurrencyAmount(123f, Currency.getInstance("CNY")), "¥120"},
174 {new CurrencyAmount(1234f, Currency.getInstance("CNY")), "¥1200"},
175 {new CurrencyAmount(12345f, Currency.getInstance("CNY")), "¥1.2万"},
176 {new CurrencyAmount(123456f, Currency.getInstance("CNY")), "¥12万"},
177 {new CurrencyAmount(1234567f, Currency.getInstance("CNY")), "¥120万"},
178 {new CurrencyAmount(12345678f, Currency.getInstance("CNY")), "¥1200万"},
179 {new CurrencyAmount(123456789f, Currency.getInstance("CNY")), "¥1.2亿"},
[all …]
DPluralRangesTest.java27 import com.ibm.icu.util.Currency;
87 … {0.0, 1.0, ULocale.ENGLISH, UnitWidth.NARROW, Currency.getInstance("EUR"), "€0.00 – €1.00"}, in TestFormatting()
88 … {0.0, 1.0, ULocale.FRENCH, UnitWidth.NARROW, Currency.getInstance("EUR"), "0,00–1,00 €"}, in TestFormatting()
89 … {0.0, 100.0, ULocale.FRENCH, UnitWidth.NARROW, Currency.getInstance("JPY"), "0–100\u00a0¥"}, in TestFormatting()
91 … {0.0, 1.0, ULocale.ENGLISH, UnitWidth.SHORT, Currency.getInstance("EUR"), "€0.00 – €1.00"}, in TestFormatting()
92 … {0.0, 1.0, ULocale.FRENCH, UnitWidth.SHORT, Currency.getInstance("EUR"), "0,00–1,00\u00a0€"}, in TestFormatting()
93 … {0.0, 100.0, ULocale.FRENCH, UnitWidth.SHORT, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
95 … {0.0, 1.0, ULocale.ENGLISH, UnitWidth.FULL_NAME, Currency.getInstance("EUR"), "0.00–1.00 euros"}, in TestFormatting()
96 … {0.0, 1.0, ULocale.FRENCH, UnitWidth.FULL_NAME, Currency.getInstance("EUR"), "0,00–1,00 euro"}, in TestFormatting()
97 … {0.0, 2.0, ULocale.FRENCH, UnitWidth.FULL_NAME, Currency.getInstance("EUR"), "0,00–2,00 euros"}, in TestFormatting()
[all …]
DDataDrivenNumberFormatTestData.java21 import com.ibm.icu.util.Currency;
63 public Currency currency = null;
102 public Currency.CurrencyUsage currencyUsage = null;
148 private static Map<String, Currency.CurrencyUsage> currencyUsageMap =
149 new HashMap<String, Currency.CurrencyUsage>();
152 currencyUsageMap.put("standard", Currency.CurrencyUsage.STANDARD);
153 currencyUsageMap.put("cash", Currency.CurrencyUsage.CASH);
256 currency = Currency.getInstance(value); in setCurrency()
/third_party/icu/ohos_icu4j/src/main/tests/ohos/global/icu/dev/test/format/
DCompactDecimalFormatTest.java39 import ohos.global.icu.util.Currency;
174 {new CurrencyAmount(1f, Currency.getInstance("CNY")), "¥1"},
175 {new CurrencyAmount(12f, Currency.getInstance("CNY")), "¥12"},
176 {new CurrencyAmount(123f, Currency.getInstance("CNY")), "¥120"},
177 {new CurrencyAmount(1234f, Currency.getInstance("CNY")), "¥1200"},
178 {new CurrencyAmount(12345f, Currency.getInstance("CNY")), "¥1.2万"},
179 {new CurrencyAmount(123456f, Currency.getInstance("CNY")), "¥12万"},
180 {new CurrencyAmount(1234567f, Currency.getInstance("CNY")), "¥120万"},
181 {new CurrencyAmount(12345678f, Currency.getInstance("CNY")), "¥1200万"},
182 {new CurrencyAmount(123456789f, Currency.getInstance("CNY")), "¥1.2亿"},
[all …]
DPluralRangesTest.java26 import ohos.global.icu.util.Currency;
91 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.NARROW, Currency.getInstance("EUR"), "€0.00–1.00"}, in TestFormatting()
92 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.NARROW, Currency.getInstance("EUR"), "0,00–1,00 €"}, in TestFormatting()
93 … {0.0, 100.0, ULocale.FRENCH, FormatWidth.NARROW, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
95 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.SHORT, Currency.getInstance("EUR"), "EUR0.00–1.00"}, in TestFormatting()
96 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.SHORT, Currency.getInstance("EUR"), "0,00–1,00\u00a0EUR"}, in TestFormatting()
97 … {0.0, 100.0, ULocale.FRENCH, FormatWidth.SHORT, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
99 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0.00–1.00 euros"}, in TestFormatting()
100 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0,00–1,00 euro"}, in TestFormatting()
101 … {0.0, 2.0, ULocale.FRENCH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0,00–2,00 euros"}, in TestFormatting()
[all …]
DDataDrivenNumberFormatTestData.java22 import ohos.global.icu.util.Currency;
66 public Currency currency = null;
105 public Currency.CurrencyUsage currencyUsage = null;
151 private static Map<String, Currency.CurrencyUsage> currencyUsageMap =
152 new HashMap<String, Currency.CurrencyUsage>();
155 currencyUsageMap.put("standard", Currency.CurrencyUsage.STANDARD);
156 currencyUsageMap.put("cash", Currency.CurrencyUsage.CASH);
259 currency = Currency.getInstance(value); in setCurrency()
/third_party/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/
DCurrencyNameTest.java13 import java.util.Currency;
27 private static final Set<Currency> AVAILABLE_CURRENCIES;
32 Set<Currency> currencies = null;
34 … mGetDisplayName = Currency.class.getMethod("getDisplayName", new Class[] {Locale.class});
35 …Method mGetAvailableCurrencies = Currency.class.getMethod("getAvailableCurrencies", (Class[]) null…
36 currencies = (Set<Currency>)mGetAvailableCurrencies.invoke(null, (Object[]) null);
43 currencies = new HashSet<Currency>();
49 Currency currency = Currency.getInstance(l);
64 for (Currency currency : AVAILABLE_CURRENCIES) { in TestCurrencySymbols()
66 … com.ibm.icu.util.Currency currencyIcu = com.ibm.icu.util.Currency.getInstance(currencyCode); in TestCurrencySymbols()
[all …]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DCurrencyAmount.java33 public CurrencyAmount(Number number, Currency currency) { in CurrencyAmount()
43 public CurrencyAmount(double number, Currency currency) { in CurrencyAmount()
53 public CurrencyAmount(Number number, java.util.Currency currency) { in CurrencyAmount()
54 this(number, Currency.fromJavaCurrency(currency)); in CurrencyAmount()
63 public CurrencyAmount(double number, java.util.Currency currency) { in CurrencyAmount()
64 this(number, Currency.fromJavaCurrency(currency)); in CurrencyAmount()
72 public Currency getCurrency() { in getCurrency()
73 return (Currency) getUnit(); in getCurrency()
DCurrencyServiceShim.java25 final class CurrencyServiceShim extends Currency.ServiceShim {
41 Currency createInstance(ULocale loc) { in createInstance()
45 return Currency.createCurrency(loc); in createInstance()
47 Currency curr = (Currency)service.get(loc); in createInstance()
51 Object registerInstance(Currency currency, ULocale locale) { in registerInstance()
65 return Currency.createCurrency(loc); in CFService()
DCurrency.java61 public class Currency extends MeasureUnit { class
149 abstract Currency createInstance(ULocale l); in createInstance()
150 abstract Object registerInstance(Currency c, ULocale l); in registerInstance()
182 public static Currency getInstance(Locale locale) { in getInstance()
191 public static Currency getInstance(ULocale locale) { in getInstance()
250 public static Set<Currency> getAvailableCurrencies() { in getAvailableCurrencies()
253 HashSet<Currency> resultSet = new HashSet<>(list.size()); in getAvailableCurrencies()
260 private static final CacheBase<String, Currency, Void> regionCurrencyCache =
261 new SoftCache<String, Currency, Void>() {
263 protected Currency createInstance(String key, Void unused) {
[all …]
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/util/
DCurrencyAmount.java32 public CurrencyAmount(Number number, Currency currency) { in CurrencyAmount()
41 public CurrencyAmount(double number, Currency currency) { in CurrencyAmount()
50 public CurrencyAmount(Number number, java.util.Currency currency) { in CurrencyAmount()
51 this(number, Currency.fromJavaCurrency(currency)); in CurrencyAmount()
59 public CurrencyAmount(double number, java.util.Currency currency) { in CurrencyAmount()
60 this(number, Currency.fromJavaCurrency(currency)); in CurrencyAmount()
67 public Currency getCurrency() { in getCurrency()
68 return (Currency) getUnit(); in getCurrency()
DCurrencyServiceShim.java26 final class CurrencyServiceShim extends Currency.ServiceShim {
42 Currency createInstance(ULocale loc) { in createInstance()
46 return Currency.createCurrency(loc); in createInstance()
48 Currency curr = (Currency)service.get(loc); in createInstance()
52 Object registerInstance(Currency currency, ULocale locale) { in registerInstance()
66 return Currency.createCurrency(loc); in CFService()
DCurrency.java61 public class Currency extends MeasureUnit { class
141 abstract Currency createInstance(ULocale l); in createInstance()
142 abstract Object registerInstance(Currency c, ULocale l); in registerInstance()
173 public static Currency getInstance(Locale locale) { in getInstance()
181 public static Currency getInstance(ULocale locale) { in getInstance()
236 public static Set<Currency> getAvailableCurrencies() { in getAvailableCurrencies()
239 HashSet<Currency> resultSet = new HashSet<>(list.size()); in getAvailableCurrencies()
246 private static final CacheBase<String, Currency, Void> regionCurrencyCache =
247 new SoftCache<String, Currency, Void>() {
249 protected Currency createInstance(String key, Void unused) {
[all …]
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/
DCustomSymbolCurrency.java6 import com.ibm.icu.util.Currency;
9 public class CustomSymbolCurrency extends Currency {
16 … public static Currency resolve(Currency currency, ULocale locale, DecimalFormatSymbols symbols) { in resolve()
21 return Currency.getInstance("XXX"); in resolve()
28 String currency1 = currency.getName(symbols.getULocale(), Currency.SYMBOL_NAME, null); in resolve()
DMutablePatternModifier.java13 import com.ibm.icu.util.Currency;
49 Currency currency;
113 Currency currency, in setSymbols()
407 selector = Currency.SYMBOL_NAME; in getSymbol()
410 selector = Currency.NARROW_SYMBOL_NAME; in getSymbol()
413 selector = Currency.FORMAL_SYMBOL_NAME; in getSymbol()
416 selector = Currency.VARIANT_SYMBOL_NAME; in getSymbol()
431 … .getName(symbols.getULocale(), Currency.PLURAL_LONG_NAME, plural.getKeyword(), null); in getSymbol()
435 return currency.getName(symbols.getULocale(), Currency.NARROW_SYMBOL_NAME, null); in getSymbol()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/
DCustomSymbolCurrency.java7 import ohos.global.icu.util.Currency;
13 public class CustomSymbolCurrency extends Currency {
20 … public static Currency resolve(Currency currency, ULocale locale, DecimalFormatSymbols symbols) { in resolve()
25 return Currency.getInstance("XXX"); in resolve()
32 String currency1 = currency.getName(symbols.getULocale(), Currency.SYMBOL_NAME, null); in resolve()
DMutablePatternModifier.java14 import ohos.global.icu.util.Currency;
51 Currency currency;
115 Currency currency, in setSymbols()
412 selector = Currency.SYMBOL_NAME; in getSymbol()
415 selector = Currency.NARROW_SYMBOL_NAME; in getSymbol()
418 selector = Currency.FORMAL_SYMBOL_NAME; in getSymbol()
421 selector = Currency.VARIANT_SYMBOL_NAME; in getSymbol()
436 … .getName(symbols.getULocale(), Currency.PLURAL_LONG_NAME, plural.getKeyword(), null); in getSymbol()
440 return currency.getName(symbols.getULocale(), Currency.NARROW_SYMBOL_NAME, null); in getSymbol()
/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/number/parse/
DCombinedCurrencyMatcher.java11 import com.ibm.icu.util.Currency;
12 import com.ibm.icu.util.Currency.CurrencyStringInfo;
42 …public static CombinedCurrencyMatcher getInstance(Currency currency, DecimalFormatSymbols dfs, int… in getInstance()
47 private CombinedCurrencyMatcher(Currency currency, DecimalFormatSymbols dfs, int parseFlags) { in CombinedCurrencyMatcher()
60 longNameTrie = Currency.getParsingTrie(dfs.getULocale(), Currency.LONG_NAME); in CombinedCurrencyMatcher()
61 symbolTrie = Currency.getParsingTrie(dfs.getULocale(), Currency.SYMBOL_NAME); in CombinedCurrencyMatcher()
71 .getName(dfs.getLocale(), Currency.PLURAL_LONG_NAME, pluralKeyword, null); in CombinedCurrencyMatcher()
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/number/parse/
DCombinedCurrencyMatcher.java12 import ohos.global.icu.util.Currency;
13 import ohos.global.icu.util.Currency.CurrencyStringInfo;
44 …public static CombinedCurrencyMatcher getInstance(Currency currency, DecimalFormatSymbols dfs, int… in getInstance()
49 private CombinedCurrencyMatcher(Currency currency, DecimalFormatSymbols dfs, int parseFlags) { in CombinedCurrencyMatcher()
62 longNameTrie = Currency.getParsingTrie(dfs.getULocale(), Currency.LONG_NAME); in CombinedCurrencyMatcher()
63 symbolTrie = Currency.getParsingTrie(dfs.getULocale(), Currency.SYMBOL_NAME); in CombinedCurrencyMatcher()
73 .getName(dfs.getLocale(), Currency.PLURAL_LONG_NAME, pluralKeyword, null); in CombinedCurrencyMatcher()
/third_party/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/jdkadapter/
DDecimalFormatSymbolsICU.java11 import java.util.Currency;
53 public Currency getCurrency() { in getCurrency()
54 com.ibm.icu.util.Currency icuCurrency = fIcuDecfs.getCurrency(); in getCurrency()
58 return Currency.getInstance(icuCurrency.getCurrencyCode()); in getCurrency()
132 public void setCurrency(Currency currency) { in setCurrency()
133 com.ibm.icu.util.Currency icuCurrency = null; in setCurrency()
135 icuCurrency = com.ibm.icu.util.Currency.getInstance(currency.getCurrencyCode()); in setCurrency()
DNumberFormatICU.java15 import java.util.Currency;
80 public Currency getCurrency() { in getCurrency()
81 com.ibm.icu.util.Currency icuCurrency = fIcuNfmt.getCurrency(); in getCurrency()
85 return Currency.getInstance(icuCurrency.getCurrencyCode()); in getCurrency()
169 public void setCurrency(Currency currency) { in setCurrency()
173 fIcuNfmt.setCurrency(com.ibm.icu.util.Currency.getInstance(currency.getCurrencyCode())); in setCurrency()
/third_party/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/icuadapter/
DNumberFormatJDK.java19 import com.ibm.icu.util.Currency;
86 java.util.Currency save = fJdkNfmt.getCurrency(); in format()
90 fJdkNfmt.setCurrency(java.util.Currency.getInstance(currCode)); in format()
119 public Currency getCurrency() { in getCurrency()
120 java.util.Currency jdkCurrency = fJdkNfmt.getCurrency(); in getCurrency()
124 return Currency.getInstance(jdkCurrency.getCurrencyCode()); in getCurrency()
207 public void setCurrency(Currency theCurrency) { in setCurrency()
212 fJdkNfmt.setCurrency(java.util.Currency.getInstance(theCurrency.getCurrencyCode())); in setCurrency()
/third_party/icu/icu4j/demos/src/com/ibm/icu/dev/demo/number/
DCurrencyDemo.java22 import com.ibm.icu.util.Currency;
35 static NumberFormat getCurrencyFormat(Currency currency, in getCurrencyFormat()
93 …NumberFormat nf26 = getCurrencyFormat(Currency.getInstance(testCurrencies[j]), testLocales[i], tru… in testFormatHack()
98 …NumberFormat nf24 = getCurrencyFormat(Currency.getInstance(testCurrencies[j]), testLocales[i], fal… in testFormatHack()

1234567