Java Utililty Methods Currency Name Get

List of utility methods to do Currency Name Get

Description

The list of methods to do Currency Name Get are organized into topic(s).

Method

StringcountryFlagForCurrency(String c)
country Flag For Currency
if (EUR.equals(c)) {
    return "europeanunion";
} else if (USD.equals(c)) {
    return "us";
String commodityCode = COMMODITIES.get(c);
if (commodityCode != null) {
    return commodityCode;
...
CurrencygetDefaultCurrency()
get Default Currency
return Currency.getInstance(Locale.getDefault());
StringgetLocalSymbol(Currency currency)
Always returns the local symbol (for example $ or the euro symbol) of a currency, whatever the locale of the system is.
return currencyLocaleMap.containsKey(currency) ? currency.getSymbol(currencyLocaleMap.get(currency))
        : currency.getSymbol();
StringnameForCurrency(String currency)
name For Currency
Currency cy = currencyFromCode(currency);
return cy == null ? null : cy.getDisplayName(Locale.ENGLISH);
StringprintCurrency(Currency value)
print Currency
if (value == null)
    throw new IllegalArgumentException("Can't print currency value!");
else
    return value.getCurrencyCode();