public enum CCurrency extends Enum<CCurrency>
Currency
fulfills your needs, please use that class.
This list is by no way exhaustive but contains at least the most commonly used currency codes.Iso3166Country
.Currency
Enum Constant and Description |
---|
ARGENTINE_PESO
Argentine Peso.
|
AUSTRALIAN_DOLLAR
Australian Dollar.
|
BRAZILIAN_REAL
Brazilian Real.
|
CANADIAN_DOLLAR
Canadian Dollar.
|
EURO
Euro.
|
ICELAND_KRONA
Iceland Krona.
|
INDIAN_RUPEE
Indian Rupee.
|
MEXICAN_PESO
Mexican Peso.
|
POUND_STERLING
Pound Sterling.
|
RAND
Rand.
|
SWISS_FRANC
Swiss Franc.
|
TURKISH_LIRA
Turkish Lira.
|
US_DOLLAR
US Dollar.
|
YEN
Japanese Yen.
|
YUAN_RENMINBI
Chinese Yen.
|
Modifier and Type | Method and Description |
---|---|
static CCurrency |
findCurrency(int numericCode)
Finds the currency with the supplied numericCode.
|
static CCurrency |
findCurrency(Locale locale)
Finds the currency used by the supplied locale.
|
static CCurrency |
findCurrency(String alphaCode)
Finds the currency with the supplied alphaCode.
|
String |
getAlphaCode()
Gets the alpha code of this currency.
|
int |
getDecimals()
Gets the number of decimals used with this currency.
|
int |
getNumericCode()
Gets the numeric code of this currency.
|
String |
getSymbol()
Gets the symbol of this currency.
|
String |
toString()
Creates a String representation of this CCurency.
|
static CCurrency |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CCurrency[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CCurrency ARGENTINE_PESO
public static final CCurrency AUSTRALIAN_DOLLAR
public static final CCurrency BRAZILIAN_REAL
public static final CCurrency CANADIAN_DOLLAR
public static final CCurrency EURO
public static final CCurrency ICELAND_KRONA
public static final CCurrency INDIAN_RUPEE
public static final CCurrency MEXICAN_PESO
public static final CCurrency POUND_STERLING
public static final CCurrency RAND
public static final CCurrency SWISS_FRANC
public static final CCurrency TURKISH_LIRA
public static final CCurrency US_DOLLAR
public static final CCurrency YEN
public static final CCurrency YUAN_RENMINBI
public static CCurrency[] values()
for (CCurrency c : CCurrency.values()) System.out.println(c);
public static CCurrency valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getAlphaCode()
public int getNumericCode()
public int getDecimals()
public String getSymbol()
public String toString()
public static CCurrency findCurrency(String alphaCode)
alphaCode
- The alphabetic code of the currency to find.
NullPointerException
- When the supplied alphaCode is null.IllegalArgumentException
- When the supplied alphaCode is empty.public static CCurrency findCurrency(int numericCode)
numericCode
- The numeric code of the currency to find.public static CCurrency findCurrency(Locale locale)
locale
- The locale to find the used currency for.NullPointerException
- When the supplied locale is null.Copyright © 2008–2018. All rights reserved.