/libcore/luni/src/main/java/java/util/ |
Currency.java | 25 * A currency corresponding to an <a href="http://en.wikipedia.org/wiki/ISO_4217">ISO 4217</a> 26 * currency code such as "EUR" or "USD". 28 public final class Currency implements Serializable { 31 private static final HashMap<String, Currency> codesToCurrencies = new HashMap<String, Currency>(); 32 private static final HashMap<Locale, Currency> localesToCurrencies = new HashMap<Locale, Currency>(); 36 private Currency(String currencyCode) { 40 throw new IllegalArgumentException("Unsupported ISO 4217 currency code: " + 46 * Returns the {@code Currency} instance for the given ISO 4217 currency code 52 Currency currency = codesToCurrencies.get(currencyCode); local 68 Currency currency = localesToCurrencies.get(locale); local [all...] |
/libcore/luni/src/main/java/java/text/ |
DecimalFormatSymbols.java | 25 import java.util.Currency; 56 private transient Currency currency; field in class:DecimalFormatSymbols 99 currency = Currency.getInstance(locale); 100 currencySymbol = currency.getSymbol(locale); 101 intlCurrencySymbol = currency.getCurrencyCode(); 103 currency = Currency.getInstance("XXX"); 174 return currency.equals(obj.currency) & [all...] |
DecimalFormat.java | 27 import java.util.Currency; 38 * percentages ("12%"), and currency amounts ("$123"). All of these flavors can 91 * special status. Two exceptions are the currency sign and quote, which are not 175 * <td>Currency sign, replaced by currency symbol. If doubled, replaced by 176 * international currency symbol. If present in a pattern, the monetary decimal 728 * Returns the currency used by this decimal format. 730 * @return the currency used by this decimal format. 734 public Currency getCurrency() { [all...] |
NumberFormat.java | 27 import java.util.Currency; 88 * {@link #getCurrencyInstance} to get the currency number format, and 321 * Returns the currency used by this number format. 324 * concrete subclasses should override this method if they support currency 328 * @return the currency that was set in getInstance() or in setCurrency(), 332 public Currency getCurrency() { 337 * Returns a {@code NumberFormat} for formatting and parsing currency values 341 * @return a {@code NumberFormat} for handling currency values. 348 * Returns a {@code NumberFormat} for formatting and parsing currency values 353 * @return a {@code NumberFormat} for handling currency values [all...] |
/external/icu4c/samples/numfmt/ |
main.cpp | 85 // currency formatting ----------------------------------------------------- *** 88 * Set a currency on a NumberFormat with pre-ICU 2.6 APIs. 92 * @param nf The NumberFormat on which to set the currency; takes effect on 93 * currency-formatting NumberFormat instances. 97 * while the currency symbol and number of decimals are set for 98 * the currency. 99 * @param currency The 3-letter ISO 4217 currency code, NUL-terminated. 103 setNumberFormatCurrency_2_4(NumberFormat &nf, const char *currency, UErrorCode &errorCode) { 108 if(currency==NULL || strlen(currency)!=3) 129 const char *currency; member in struct:__anon6968 [all...] |
/external/icu4c/i18n/unicode/ |
ucurr.h | 15 * \brief C API: Encapsulates information about a currency. 21 * The ucurr API encapsulates information about a currency, as defined by 22 * ISO 4217. A currency is represented by a 3-character string 24 * necessary the proper display of a currency: 38 * Finds a currency code for the given locale. 39 * @param locale the locale for which to retrieve a currency code. 40 * Currency can be specified by the "currency" keyword 41 * in which case it overrides the default currency code 47 * @return length of the currency string. It should always be 3. If 0 [all...] |
decimfmt.h | 58 * ("1.23E4"), percentages ("12%"), and currency amounts ("$123", "USD123", 78 * // Print out a number with the localized number, currency and percent 115 * <strong>// Print out a number using the localized number, currency, 116 * // percent, scientific, integer, iso currency, and plural currency 163 * their special status. Two exceptions are the currency sign and quote, which 238 * <td>Currency sign, replaced by currency symbol. If 239 * doubled, replaced by international currency symbol. 240 * If tripled, replaced by currency plural names, for example [all...] |
unum.h | 38 * There are different number format styles like decimal, currency, 101 * to get the currency number format for that country. Use UNUM_PERCENT 122 * locale like the currency symbol, the grouping seperator , monetary seperator 147 * Currency format with a currency symbol, e.g., "$1.00". 187 * Currency format with an ISO currency code, e.g., "USD1.00". 192 * Currency format with a pluralized currency name, 252 * Constants for specifying currency spacin [all...] |
/external/icu4c/test/intltest/ |
currcoll.cpp | 45 // All the currency symbols, in collation order 46 static const UChar currency[][2] = local 48 { 0x00A4, 0x0000}, /*00A4; L; [14 36, 03, 03] # [082B.0020.0002] # CURRENCY SIGN*/ 60 { 0x0E3F, 0x0000}, /*0E3F; L; [14 44, 03, 03] # [0832.0020.0002] # THAI CURRENCY SYMBOL BAHT*/ 61 { 0x17DB, 0x0000}, /*17DB; L; [14 46, 03, 03] # [0833.0020.0002] # KHMER CURRENCY SYMBOL RIEL*/ 62 { 0x20A0, 0x0000}, /*20A0; L; [14 48, 03, 03] # [0834.0020.0002] # EURO-CURRENCY SIGN*/ 92 // Compare each currency symbol against all the 93 // currency symbols, including itself 94 for (i = 0; i < ARRAY_LENGTH(currency); i += 1) 96 for (j = 0; j < ARRAY_LENGTH(currency); j += 1 [all...] |
winnmtst.cpp | 132 static UnicodeString &getWindowsFormat(int32_t lcid, UBool currency, UnicodeString &appendTo, const wchar_t *fmt, ...) 186 if (currency) { 229 static void testLocale(const char *localeID, int32_t lcid, NumberFormat *wnf, UBool currency, TestLog *log) 238 getWindowsFormat(lcid, currency, wdBuffer, L"%.16f", d); 240 getWindowsFormat(lcid, currency, w3Buffer, L"%I32d", i32); 242 getWindowsFormat(lcid, currency, w6Buffer, L"%I64d", i64);
|
numrgts.cpp | 832 * interpreted as monetary separator if currency symbol is seen! 930 logln ("Bug 4070798 currency test passed."); 1713 const UChar *currency = fmt1->getCurrency(); local [all...] |
numfmtst.cpp | 80 CASE(17,TestComplexCurrency); // This test removed because CLDR no longer uses choice formats in currency symbols. 616 * Test the handling of the currency symbol in patterns. 624 UChar currency = 0x00A4; local 631 pat.append(currency).append("#,##0.00;-"). 632 append(currency).append("#,##0.00"); 646 pat.append(currency).append(currency). 648 append(currency).append(currency). 701 {"en_US@currency=JPY", "\\u00A51,150"} 3175 UChar currency = 0x00A4; local [all...] |
/external/icu4c/test/cintltst/ |
ccurrtst.c | 42 /* All the currency symbols, in UCA order*/ 43 static const UChar currency[][2] = local 45 { 0x00A4, 0x0000}, /*00A4; L; [14 36, 03, 03] # [082B.0020.0002] # CURRENCY SIGN*/ 57 { 0x0E3F, 0x0000}, /*0E3F; L; [14 44, 03, 03] # [0832.0020.0002] # THAI CURRENCY SYMBOL BAHT*/ 58 { 0x17DB, 0x0000}, /*17DB; L; [14 46, 03, 03] # [0833.0020.0002] # KHMER CURRENCY SYMBOL RIEL*/ 59 { 0x20A0, 0x0000}, /*20A0; L; [14 48, 03, 03] # [0834.0020.0002] # EURO-CURRENCY SIGN*/ 78 /* All the currency symbols, in collation order*/ 79 static const UChar currency[][2] = 81 { 0x00a4, 0x0000}, /* generic currency*/ 110 log_verbose("Testing currency of all locales\n") [all...] |
cnmdptst.c | 335 * Test the handling of the currency symbol in patterns. 350 pattern[0]=pattern[11]=0xa4; /* insert latin-1 currency symbol */ 408 * Test localized currency patterns. 420 log_verbose("\nTesting the number format with different currency patterns\n"); 427 log_data_err("Error in the construction of number format with style currency: %s (Are you missing data?)\n", 455 * Test localized currency patterns for PREEURO variants. 479 log_verbose("\nTesting the number format with different currency patterns\n"); 491 log_data_err("Error in the construction of number format with style currency: %s (Are you missing data?)\n", 523 * Test currency "object" (we use this name to match the other C++ 524 * test name and the Jave name). Actually, test ISO currency cod 540 const char* currency[]={ local [all...] |
/external/icu4c/i18n/ |
winnmfmt.cpp | 43 CURRENCYFMTW currency; member in union:FormatInfo 139 Win32NumberFormat::Win32NumberFormat(const Locale &locale, UBool currency, UErrorCode &status) 140 : NumberFormat(), fCurrency(currency), fFractionDigitsSet(FALSE), fFormatInfo(NULL) 148 getCurrencyFormat(&fFormatInfo->currency, fLCID); 168 freeCurrencyFormat(&fFormatInfo->currency); 186 freeCurrencyFormat(&fFormatInfo->currency); 187 getCurrencyFormat(&fFormatInfo->currency, fLCID); 295 formatInfo.currency.NumDigits = (UINT) numDigits; 299 formatInfo.currency.Grouping = 0; 302 result = GetCurrencyFormatW(fLCID, 0, nBuffer, &formatInfo.currency, buffer, STACK_BUFFER_SIZE) [all...] |
dcfmtsym.cpp | 15 * 08/26/97 aliu Added currency/intl currency symbol support. 163 NULL, /* currency symbol - We don't really try to load this directly from CLDR until we know the currency */ 164 NULL, /* intl currency symbol - We don't really try to load this directly from CLDR until we know the currency */ 293 // Obtain currency data from the currency API. This is strictly 295 // for currency data anymore. 315 //load the currency dat 327 UResourceBundle *currency = ures_getByKeyWithFallback(currencyResource, "Currencies", NULL, &localStatus); local [all...] |
winnmfmt.h | 39 Win32NumberFormat(const Locale &locale, UBool currency, UErrorCode &status);
|
ucurr.cpp | 44 // Default currency meta data of last resort. We try to use the 139 * Unfortunately, we have to convert the UChar* currency code to char* 143 myUCharsToChars(char* resultOfLen4, const UChar* currency) { 144 u_UCharsToChars(currency, resultOfLen4, ISO_COUNTRY_CODE_LENGTH); 150 * Internal function to look up currency data. Result is an array of 156 _findMetaData(const UChar* currency, UErrorCode& ec) { 158 if (currency == 0 || *currency == 0) { 177 // Look up our currency, or if that's not available, then DEFAULT 180 UResourceBundle* rb = ures_getByKey(currencyMeta, myUCharsToChars(buf, currency), NULL, &ec2) 1491 const char *currency; member in struct:CurrencyList [all...] |
decimfmt.cpp | 73 /* For currency parsing purose, 75 * every currency format pattern, 77 * and plural currency style. And the patterns are set through applyPattern. 103 /* affix for currency formatting when the currency sign in the pattern 104 * equals to 3, such as the pattern contains 3 currency sign or 105 * the formatter style is currency plural format style. 214 * The CURRENCY_SIGN is the standard Unicode symbol for currency. It 215 * is used in patterns and substitued with either the currency symbol, 216 * or if it is doubled, with the international currency symbol. If th 1633 UChar* currency = parseCurrency ? curbuf : NULL; local [all...] |
unum.cpp | 280 UChar* currency, 298 CurrencyAmount *tempCurrAmnt = new CurrencyAmount(number, currency, *status); 423 UChar* currency, 427 currency[0] = 0; 431 u_strcpy(currency, c->getISOCurrency());
|
/external/apache-harmony/text/src/test/java/org/apache/harmony/text/tests/java/text/ |
DecimalFormatSymbolsTest.java | 29 import java.util.Currency; 248 Currency currency = Currency.getInstance("USD"); local 249 assertEquals("Returned incorrect currency", 250 dfsUS.getCurrency(), currency); 252 Currency currK = Currency.getInstance("KRW"); 253 Currency currX = Currency.getInstance("XXX") 425 Currency currency = Currency.getInstance("JPY"); local 501 Currency currency = Currency.getInstance("JPY"); local 588 Currency currency = symbols.getCurrency(); local [all...] |
/external/qemu/ |
curses_keys.h | 349 { "currency", 0x0a4 },
|
/external/icu4c/common/ |
locdispnames.cpp | 285 static const char _kCurrency[] = "currency"; 768 * if the keyword is equal to currency .. then to get the display name 778 UResourceBundle *currency = ures_getByKeyWithFallback(currencies, keywordValue, NULL, status); local 780 dispName = ures_getStringByIndex(currency, UCURRENCY_DISPLAY_NAME_INDEX, &dispNameLen, status); 783 ures_close(currency);
|
/libcore/luni/src/main/java/libcore/icu/ |
NativeDecimalFormat.java | 29 import java.util.Currency; 406 public void setCurrency(Currency currency) { 407 setSymbol(this.address, UNUM_CURRENCY_SYMBOL, currency.getSymbol()); 408 setSymbol(this.address, UNUM_INTL_CURRENCY_SYMBOL, currency.getCurrencyCode()); 605 NumberFormat.Field.CURRENCY,
|
/libcore/luni/src/main/native/ |
libcore_icu_ICU.cpp | 131 ScopedResourceBundle currency(ures_getByKey(currencyMap.get(), countryCode.c_str(), NULL, &status)); 136 ScopedResourceBundle currencyElem(ures_getByIndex(currency.get(), 0, NULL, &status)); 141 // Check if there's a 'to' date. If there is, the currency isn't used anymore. 170 // ICU's default is English. We want the ISO 4217 currency code instead. 179 // the root locale and parroting back the input because it's never heard of the currency code. 192 ScopedUtfChars currency(env, currencyCode); 193 ScopedResourceBundle currencyElems(ures_getByKey(currencies.get(), currency.c_str(), NULL, &status)); 487 // This is the UTF-8 encoding of U+00A4 (CURRENCY SIGN).
|