Home
last modified time | relevance | path

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

12

/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/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 …]
DDisplayNameTest.java22 import com.ibm.icu.util.Currency;
46 …static final Object[] currencyFormats = {new Integer(Currency.SYMBOL_NAME), new Integer(Currency.L…
112 Currency s = Currency.getInstance(code); in checkLocale()
/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 …]
DDecimalFormatSymbolsTest.java10 import java.util.Currency;
75 Currency jdkCur = jdkDecfs.getCurrency(); in TestICUEquivalent()
76 com.ibm.icu.util.Currency icuCur = icuDecfs.getCurrency(); in TestICUEquivalent()
137 Currency cur = decfs.getCurrency(); in TestSetSymbols()
138 Currency curEnUS = decfsEnUS.getCurrency(); in TestSetSymbols()
/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
121 abstract Currency createInstance(ULocale l); in createInstance()
122 abstract Object registerInstance(Currency c, ULocale l); in registerInstance()
154 public static Currency getInstance(Locale locale) { in getInstance()
163 public static Currency getInstance(ULocale locale) { in getInstance()
222 public static Set<Currency> getAvailableCurrencies() { in getAvailableCurrencies()
225 HashSet<Currency> resultSet = new HashSet<Currency>(list.size()); in getAvailableCurrencies()
238 /* package */ static Currency createCurrency(ULocale loc) { in createCurrency()
277 public static Currency getInstance(String theISOCode) { in getInstance()
285 …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.java17 import com.ibm.icu.util.Currency;
77 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.NARROW, Currency.getInstance("EUR"), "€0.00–1.00"}, in TestFormatting()
78 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.NARROW, Currency.getInstance("EUR"), "0,00–1,00 €"}, in TestFormatting()
79 … {0.0, 100.0, ULocale.FRENCH, FormatWidth.NARROW, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
81 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.SHORT, Currency.getInstance("EUR"), "EUR0.00–1.00"}, in TestFormatting()
82 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.SHORT, Currency.getInstance("EUR"), "0,00–1,00\u00a0EUR"}, in TestFormatting()
83 … {0.0, 100.0, ULocale.FRENCH, FormatWidth.SHORT, Currency.getInstance("JPY"), "0–100\u00a0JPY"}, in TestFormatting()
85 … {0.0, 1.0, ULocale.ENGLISH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0.00–1.00 euros"}, in TestFormatting()
86 … {0.0, 1.0, ULocale.FRENCH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0,00–1,00 euro"}, in TestFormatting()
87 … {0.0, 2.0, ULocale.FRENCH, FormatWidth.WIDE, Currency.getInstance("EUR"), "0,00–2,00 euros"}, in TestFormatting()
[all …]
DNumberFormatTest.java39 import com.ibm.icu.util.Currency;
516 if (!parsedVal.getCurrency().equals(Currency.getInstance("USD"))) { in TestCurrencyFormatForMixParsing()
585 Currency curr = Currency.getInstance(locale); in TestCurrency()
586 …logln("\nName of the currency is: " + curr.getName(locale, Currency.LONG_NAME, new boolean[] {fals… in TestCurrency()
604 …String strBuf = curFmt.format(new CurrencyAmount(new Float(1234.56), Currency.getInstance("USD"))); in TestCurrency()
612 if (!parsedVal.getCurrency().equals(Currency.getInstance("USD"))) { in TestCurrency()
664 numFmt.setCurrency(Currency.getInstance(currencyISOCode)); in TestCurrencyIsoPluralFormat()
834 expectCurrency(fmt, Currency.getInstance(Locale.FRANCE), in TestCurrencyObject()
837 expectCurrency(fmt, Currency.getInstance(Locale.JAPAN), in TestCurrencyObject()
840 expectCurrency(fmt, Currency.getInstance(new Locale("fr", "CH", "")), in TestCurrencyObject()
[all …]
DIntlTestDecimalFormatSymbols.java23 import com.ibm.icu.util.Currency;
56 Currency currency = Currency.getInstance("USD"); in TestSymbols()
/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()
DDecimalFormatICU.java16 import java.util.Currency;
132 public Currency getCurrency() { in getCurrency()
133 com.ibm.icu.util.Currency icuCurrency = fIcuDecfmt.getCurrency(); in getCurrency()
137 return Currency.getInstance(icuCurrency.getCurrencyCode()); in getCurrency()
249 public void setCurrency(Currency currency) { in setCurrency()
253 … fIcuDecfmt.setCurrency(com.ibm.icu.util.Currency.getInstance(currency.getCurrencyCode())); in setCurrency()
265 Currency currency = newSymbols.getCurrency(); in setDecimalFormatSymbols()
269 … icuDecfs.setCurrency(com.ibm.icu.util.Currency.getInstance(currency.getCurrencyCode())); in setDecimalFormatSymbols()
/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/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
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DNumberFormat.java25 import com.ibm.icu.util.Currency;
26 import com.ibm.icu.util.Currency.CurrencyUsage;
393 Currency save = getCurrency(), curr = currAmt.getCurrency(); in format()
1237 public void setCurrency(Currency theCurrency) { in setCurrency()
1246 public Currency getCurrency() { in getCurrency()
1259 protected Currency getEffectiveCurrency() { in getEffectiveCurrency()
1260 Currency c = getCurrency(); in getEffectiveCurrency()
1266 c = Currency.getInstance(uloc); in getEffectiveCurrency()
1737 private Currency currency;
DDecimalFormatSymbols.java24 import com.ibm.icu.util.Currency;
474 public Currency getCurrency() { in getCurrency()
495 public void setCurrency(Currency currency) { in setCurrency()
972 currency = Currency.getInstance(locale); in initialize()
976 currname = currency.getName(locale, Currency.SYMBOL_NAME, isChoiceFormat); in initialize()
1087 currency = Currency.getInstance(intlCurrencySymbol); in readObject()
1400 private transient Currency currency;
DDecimalFormat.java31 import com.ibm.icu.util.Currency;
32 import com.ibm.icu.util.Currency.CurrencyUsage;
632 setCurrency(Currency.getInstance(def)); in DecimalFormat()
665 setCurrency(Currency.getInstance(def)); in DecimalFormat()
1891 Currency[] currency = new Currency[1];
1907 private Object parse(String text, ParsePosition parsePosition, Currency[] currency) {
1940 false, Currency.SYMBOL_NAME)) {
2011 Currency[] currency, boolean[] status) {
2038 true, Currency.LONG_NAME);
2042 true, Currency.SYMBOL_NAME);
[all …]
DMeasureFormat.java39 import com.ibm.icu.util.Currency;
399 final boolean isCurrency = unit instanceof Currency; in formatMeasureRange()
407 Currency currency = (Currency) unit; in formatMeasureRange()
443 Currency currencyUnit = (Currency) unit; in formatMeasureRange()
466 …private void appendReplacingCurrency(String affix, Currency unit, StandardPluralCategories resolve… in appendReplacingCurrency()
484 … currentStyle == NumberFormat.CURRENCYSTYLE ? Currency.SYMBOL_NAME : Currency.PLURAL_LONG_NAME, in appendReplacingCurrency()
776 if (unit instanceof Currency) { in loadLocaleData()
877 if (measure.getUnit() instanceof Currency) { in formatMeasure()
880 new CurrencyAmount(measure.getNumber(), (Currency) measure.getUnit()), in formatMeasure()
/external/icu/icu4j/main/classes/collate/src/com/ibm/icu/util/
DGlobalizationPreferences.java385 public GlobalizationPreferences setCurrency(Currency currency) { in setCurrency()
400 public Currency getCurrency() { in getCurrency()
596 Currency temp = new Currency(id); in getDisplayName()
598 ? Currency.LONG_NAME in getDisplayName()
599 : Currency.SYMBOL_NAME, new boolean[1]); in getDisplayName()
1041 protected Currency guessCurrency() { in guessCurrency()
1042 return Currency.getInstance(new ULocale("und-" + getTerritory())); in guessCurrency()
1169 private Currency currency;
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/serializable/
DSerializableTest.java26 import com.ibm.icu.util.Currency;
415 Currency currencies[] = new Currency[places.length]; in getTestObjects()
418 currencies[i] = Currency.getInstance(places[i]); in getTestObjects()
427 Currency curr_a = (Currency) a; in hasSameBehavior()
428 Currency curr_b = (Currency) b; in hasSameBehavior()

12