Home
last modified time | relevance | path

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

1234

/external/guava/guava-gwt/test-super/com/google/common/collect/super/com/google/common/collect/
DEnumBiMapTest.java45 private enum Currency { DOLLAR, FRANC, PESO, POUND, YEN } enum in EnumBiMapTest
48 public static final class EnumBiMapGenerator implements TestBiMapGenerator<Country, Currency> {
51 public BiMap<Country, Currency> create(Object... entries) { in create()
52 BiMap<Country, Currency> result = EnumBiMap.create(Country.class, Currency.class); in create()
54 Entry<Country, Currency> entry = (Entry<Country, Currency>) object; in create()
61 public SampleElements<Entry<Country, Currency>> samples() { in samples()
62 return new SampleElements<Entry<Country, Currency>>( in samples()
63 Helpers.mapEntry(Country.CANADA, Currency.DOLLAR), in samples()
64 Helpers.mapEntry(Country.CHILE, Currency.PESO), in samples()
65 Helpers.mapEntry(Country.UK, Currency.POUND), in samples()
[all …]
DEnumHashBiMapTest.java38 private enum Currency { DOLLAR, FRANC, PESO, POUND, YEN } enum in EnumHashBiMapTest
86 EnumHashBiMap<Currency, String> bimap = in testCreate()
87 EnumHashBiMap.create(Currency.class); in testCreate()
91 bimap.put(Currency.DOLLAR, "dollar"); in testCreate()
92 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreate()
93 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreate()
98 Map<Currency, String> map = ImmutableMap.of( in testCreateFromMap()
99 Currency.DOLLAR, "dollar", in testCreateFromMap()
100 Currency.PESO, "peso", in testCreateFromMap()
101 Currency.FRANC, "franc"); in testCreateFromMap()
[all …]
/external/guava/guava-tests/test/com/google/common/collect/
DEnumBiMapTest.java54 private enum Currency { DOLLAR, FRANC, PESO, POUND, YEN } enum in EnumBiMapTest
57 public static final class EnumBiMapGenerator implements TestBiMapGenerator<Country, Currency> {
60 public BiMap<Country, Currency> create(Object... entries) { in create()
61 BiMap<Country, Currency> result = EnumBiMap.create(Country.class, Currency.class); in create()
63 Entry<Country, Currency> entry = (Entry<Country, Currency>) object; in create()
70 public SampleElements<Entry<Country, Currency>> samples() { in samples()
71 return new SampleElements<Entry<Country, Currency>>( in samples()
72 Helpers.mapEntry(Country.CANADA, Currency.DOLLAR), in samples()
73 Helpers.mapEntry(Country.CHILE, Currency.PESO), in samples()
74 Helpers.mapEntry(Country.UK, Currency.POUND), in samples()
[all …]
DEnumHashBiMapTest.java47 private enum Currency { DOLLAR, FRANC, PESO, POUND, YEN } enum in EnumHashBiMapTest
111 EnumHashBiMap<Currency, String> bimap = in testCreate()
112 EnumHashBiMap.create(Currency.class); in testCreate()
116 bimap.put(Currency.DOLLAR, "dollar"); in testCreate()
117 assertEquals("dollar", bimap.get(Currency.DOLLAR)); in testCreate()
118 assertEquals(Currency.DOLLAR, bimap.inverse().get("dollar")); in testCreate()
123 Map<Currency, String> map = ImmutableMap.of( in testCreateFromMap()
124 Currency.DOLLAR, "dollar", in testCreateFromMap()
125 Currency.PESO, "peso", in testCreateFromMap()
126 Currency.FRANC, "franc"); in testCreateFromMap()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/util/
DCurrencyTest.java33 import android.icu.util.Currency;
55 Currency usd = Currency.getInstance("USD"); in TestAPI()
57 Currency jpy = Currency.getInstance("JPY"); in TestAPI()
72 Currency nullCurrency = Currency.getInstance((String)null); in TestAPI()
80 Currency bogusCurrency = Currency.getInstance("BOGUS"); in TestAPI()
87 Locale[] avail = Currency.getAvailableLocales(); in TestAPI()
105 final Currency jpy = Currency.getInstance("JPY"); in TestRegistration()
106 final Currency usd = Currency.getInstance(Locale.US); in TestRegistration()
109 Currency.unregister(null); // should fail, coverage in TestRegistration()
116 if (Currency.unregister("")) { // coverage in TestRegistration()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/util/
DCurrencyTest.java32 import com.ibm.icu.util.Currency;
51 Currency usd = Currency.getInstance("USD"); in TestAPI()
53 Currency jpy = Currency.getInstance("JPY"); in TestAPI()
68 Currency nullCurrency = Currency.getInstance((String)null); in TestAPI()
76 Currency bogusCurrency = Currency.getInstance("BOGUS"); in TestAPI()
83 Locale[] avail = Currency.getAvailableLocales(); in TestAPI()
101 final Currency jpy = Currency.getInstance("JPY"); in TestRegistration()
102 final Currency usd = Currency.getInstance(Locale.US); in TestRegistration()
105 Currency.unregister(null); // should fail, coverage in TestRegistration()
112 if (Currency.unregister("")) { // coverage in TestRegistration()
[all …]
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/util/
DCurrency.java34 public class Currency implements Serializable { class
40 public final java.util.Currency currency;
46 public Currency(java.util.Currency delegate) { in Currency() method in Currency
79 public static Currency getInstance(Locale locale) { in getInstance()
80 return new Currency(java.util.Currency.getInstance(locale)); in getInstance()
88 public static Currency getInstance(ULocale locale) { in getInstance()
89 return new Currency(java.util.Currency.getInstance(locale.toLocale())); in getInstance()
129 public static Currency getInstance(String theISOCode) { in getInstance()
130 return new Currency(java.util.Currency.getInstance(theISOCode)); in getInstance()
225 return currency.equals(((Currency)rhs).currency); in equals()
/external/icu/android_icu4j/cts-coverage/src/main/tests/android/icu/cts/coverage/util/
DCurrencyTest.java18 import android.icu.util.Currency;
35 Currency currency = Currency.getInstance(ULocale.CHINA); in testGetName_Locale_Int_String_BooleanArray()
37 int nameStyle = Currency.LONG_NAME; in testGetName_Locale_Int_String_BooleanArray()
48 Currency currency = Currency.getInstance(ULocale.CHINA); in testGetDefaultFractionDigits_CurrencyUsage()
49 int cashFractionDigits = currency.getDefaultFractionDigits(Currency.CurrencyUsage.CASH); in testGetDefaultFractionDigits_CurrencyUsage()
55 Currency currency = Currency.getInstance(ULocale.JAPAN); in testGetRoundingIncrement()
63 Currency currency = Currency.getInstance(ULocale.JAPAN); in testGetRoundingIncrement_CurrencyUsage()
65 double roundingIncrement = currency.getRoundingIncrement(Currency.CurrencyUsage.CASH); in testGetRoundingIncrement_CurrencyUsage()
/external/icu/icu4j/main/tests/localespi/src/com/ibm/icu/dev/test/localespi/
DCurrencyNameTest.java11 import java.util.Currency;
24 private static final Set<Currency> AVAILABLE_CURRENCIES;
29 Set<Currency> currencies = null;
31 … mGetDisplayName = Currency.class.getMethod("getDisplayName", new Class[] {Locale.class});
32 …Method mGetAvailableCurrencies = Currency.class.getMethod("getAvailableCurrencies", (Class[]) null…
33 currencies = (Set<Currency>)mGetAvailableCurrencies.invoke(null, (Object[]) null);
40 currencies = new HashSet<Currency>();
46 Currency currency = Currency.getInstance(l);
60 for (Currency currency : AVAILABLE_CURRENCIES) { in TestCurrencySymbols()
62 … com.ibm.icu.util.Currency currencyIcu = com.ibm.icu.util.Currency.getInstance(currencyCode); in TestCurrencySymbols()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/util/
DCurrencyServiceShim.java23 final class CurrencyServiceShim extends Currency.ServiceShim {
39 Currency createInstance(ULocale loc) { in createInstance()
43 return Currency.createCurrency(loc); in createInstance()
45 Currency curr = (Currency)service.get(loc); in createInstance()
49 Object registerInstance(Currency currency, ULocale locale) { in registerInstance()
63 return Currency.createCurrency(loc); in CFService()
DCurrencyAmount.java31 public CurrencyAmount(Number number, Currency currency) { in CurrencyAmount()
41 public CurrencyAmount(double number, Currency currency) { in CurrencyAmount()
50 public Currency getCurrency() { in getCurrency()
51 return (Currency) getUnit(); in getCurrency()
DCurrency.java55 public class Currency extends MeasureUnit { class
118 abstract Currency createInstance(ULocale l); in createInstance()
119 abstract Object registerInstance(Currency c, ULocale l); in registerInstance()
151 public static Currency getInstance(Locale locale) { in getInstance()
160 public static Currency getInstance(ULocale locale) { in getInstance()
218 public static Set<Currency> getAvailableCurrencies() { in getAvailableCurrencies()
221 HashSet<Currency> resultSet = new HashSet<Currency>(list.size()); in getAvailableCurrencies()
234 /* package */ static Currency createCurrency(ULocale loc) { in createCurrency()
273 public static Currency getInstance(String theISOCode) { in getInstance()
281 …return (Currency) MeasureUnit.internalGetInstance("currency", theISOCode.toUpperCase(Locale.ENGLIS… in getInstance()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/util/
DCurrencyServiceShim.java24 final class CurrencyServiceShim extends Currency.ServiceShim {
40 Currency createInstance(ULocale loc) { in createInstance()
44 return Currency.createCurrency(loc); in createInstance()
46 Currency curr = (Currency)service.get(loc); in createInstance()
50 Object registerInstance(Currency currency, ULocale locale) { in registerInstance()
64 return Currency.createCurrency(loc); in CFService()
DCurrencyAmount.java30 public CurrencyAmount(Number number, Currency currency) { in CurrencyAmount()
39 public CurrencyAmount(double number, Currency currency) { in CurrencyAmount()
47 public Currency getCurrency() { in getCurrency()
48 return (Currency) getUnit(); in getCurrency()
DCurrency.java55 public class Currency extends MeasureUnit { class
112 abstract Currency createInstance(ULocale l); in createInstance()
113 abstract Object registerInstance(Currency c, ULocale l); in registerInstance()
144 public static Currency getInstance(Locale locale) { in getInstance()
152 public static Currency getInstance(ULocale locale) { in getInstance()
206 public static Set<Currency> getAvailableCurrencies() { in getAvailableCurrencies()
209 HashSet<Currency> resultSet = new HashSet<Currency>(list.size()); in getAvailableCurrencies()
222 /* package */ static Currency createCurrency(ULocale loc) { in createCurrency()
260 public static Currency getInstance(String theISOCode) { in getInstance()
268 …return (Currency) MeasureUnit.internalGetInstance("currency", theISOCode.toUpperCase(Locale.ENGLIS… in getInstance()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DPluralRangesTest.java18 import com.ibm.icu.util.Currency;
79 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.NARROW, Currency.getInstance("EUR"), "€0.00–1.00"}, in TestFormatting()
80 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.NARROW, Currency.getInstance("EUR"), "0,00–1,00 €"}, in TestFormatting()
81 … {0.0, 100.0, ULocale.FRENCH, FormatWidth.NARROW, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
83 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.SHORT, Currency.getInstance("EUR"), "EUR0.00–1.00"}, in TestFormatting()
84 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.SHORT, Currency.getInstance("EUR"), "0,00–1,00\u00a0EUR"}, in TestFormatting()
85 … {0.0, 100.0, ULocale.FRENCH, FormatWidth.SHORT, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
87 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0.00–1.00 euros"}, in TestFormatting()
88 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0,00–1,00 euro"}, in TestFormatting()
89 … {0.0, 2.0, ULocale.FRENCH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0,00–2,00 euros"}, in TestFormatting()
[all …]
DNumberFormatTestTuple.java19 import com.ibm.icu.util.Currency;
61 public Currency currency = null;
100 public Currency.CurrencyUsage currencyUsage = null;
144 private static Map<String, Currency.CurrencyUsage> currencyUsageMap =
145 new HashMap<String, Currency.CurrencyUsage>();
148 currencyUsageMap.put("standard", Currency.CurrencyUsage.STANDARD);
149 currencyUsageMap.put("cash", Currency.CurrencyUsage.CASH);
251 currency = Currency.getInstance(value); in setCurrency()
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DPluralRangesTest.java19 import android.icu.util.Currency;
83 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.NARROW, Currency.getInstance("EUR"), "€0.00–1.00"}, in TestFormatting()
84 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.NARROW, Currency.getInstance("EUR"), "0,00–1,00 €"}, in TestFormatting()
85 … {0.0, 100.0, ULocale.FRENCH, FormatWidth.NARROW, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
87 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.SHORT, Currency.getInstance("EUR"), "EUR0.00–1.00"}, in TestFormatting()
88 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.SHORT, Currency.getInstance("EUR"), "0,00–1,00\u00a0EUR"}, in TestFormatting()
89 … {0.0, 100.0, ULocale.FRENCH, FormatWidth.SHORT, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
91 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0.00–1.00 euros"}, in TestFormatting()
92 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0,00–1,00 euro"}, in TestFormatting()
93 … {0.0, 2.0, ULocale.FRENCH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0,00–2,00 euros"}, in TestFormatting()
[all …]
DNumberFormatTestTuple.java20 import android.icu.util.Currency;
62 public Currency currency = null;
101 public Currency.CurrencyUsage currencyUsage = null;
145 private static Map<String, Currency.CurrencyUsage> currencyUsageMap =
146 new HashMap<String, Currency.CurrencyUsage>();
149 currencyUsageMap.put("standard", Currency.CurrencyUsage.STANDARD);
150 currencyUsageMap.put("cash", Currency.CurrencyUsage.CASH);
252 currency = Currency.getInstance(value); in setCurrency()
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/jdkadapter/
DDecimalFormatSymbolsICU.java9 import java.util.Currency;
51 public Currency getCurrency() { in getCurrency()
52 com.ibm.icu.util.Currency icuCurrency = fIcuDecfs.getCurrency(); in getCurrency()
56 return Currency.getInstance(icuCurrency.getCurrencyCode()); in getCurrency()
130 public void setCurrency(Currency currency) { in setCurrency()
131 com.ibm.icu.util.Currency icuCurrency = null; in setCurrency()
133 icuCurrency = com.ibm.icu.util.Currency.getInstance(currency.getCurrencyCode()); in setCurrency()
DNumberFormatICU.java13 import java.util.Currency;
78 public Currency getCurrency() { in getCurrency()
79 com.ibm.icu.util.Currency icuCurrency = fIcuNfmt.getCurrency(); in getCurrency()
83 return Currency.getInstance(icuCurrency.getCurrencyCode()); in getCurrency()
167 public void setCurrency(Currency currency) { in setCurrency()
171 fIcuNfmt.setCurrency(com.ibm.icu.util.Currency.getInstance(currency.getCurrencyCode())); in setCurrency()
/external/icu/icu4j/main/classes/localespi/src/com/ibm/icu/impl/icuadapter/
DNumberFormatJDK.java17 import com.ibm.icu.util.Currency;
84 java.util.Currency save = fJdkNfmt.getCurrency(); in format()
88 fJdkNfmt.setCurrency(java.util.Currency.getInstance(currCode)); in format()
117 public Currency getCurrency() { in getCurrency()
118 java.util.Currency jdkCurrency = fJdkNfmt.getCurrency(); in getCurrency()
122 return Currency.getInstance(jdkCurrency.getCurrencyCode()); in getCurrency()
205 public void setCurrency(Currency theCurrency) { in setCurrency()
210 fJdkNfmt.setCurrency(java.util.Currency.getInstance(theCurrency.getCurrencyCode())); in setCurrency()
/external/icu/icu4j/eclipse-build/plugins.template/com.ibm.icu.base/src/com/ibm/icu/text/
DDecimalFormatSymbols.java14 import com.ibm.icu.util.Currency;
412 public Currency getCurrency() { in getCurrency()
413 return new Currency(dfs.getCurrency()); in getCurrency()
433 public void setCurrency(Currency currency) { in setCurrency()
434 dfs.setCurrency(java.util.Currency.getInstance(currency.getCurrencyCode())); in setCurrency()
/external/icu/icu4j/demos/src/com/ibm/icu/dev/demo/number/
DCurrencyDemo.java20 import com.ibm.icu.util.Currency;
33 static NumberFormat getCurrencyFormat(Currency currency, in getCurrencyFormat()
91 …NumberFormat nf26 = getCurrencyFormat(Currency.getInstance(testCurrencies[j]), testLocales[i], tru… in testFormatHack()
96 …NumberFormat nf24 = getCurrencyFormat(Currency.getInstance(testCurrencies[j]), testLocales[i], fal… in testFormatHack()
/external/icu/icu4j/main/classes/currdata/src/com/ibm/icu/impl/
DICUCurrencyMetaInfo.java16 import com.ibm.icu.util.Currency.CurrencyUsage;
82 needed |= Currency; in collect()
129 if ((needed & Currency) != 0) { in collectRegion()
239 return Currency; in collects()
248 private static final int Currency = 2; field in ICUCurrencyMetaInfo

1234