| Package | Description |
|---|---|
| org.joda.money | |
| org.joda.money.format |
| Modifier and Type | Field | Description |
|---|---|---|
static CurrencyUnit |
CurrencyUnit.AUD |
The currency 'AUD' - Australian Dollar.
|
static CurrencyUnit |
CurrencyUnit.CAD |
The currency 'CAD' - Canadian Dollar.
|
static CurrencyUnit |
CurrencyUnit.CHF |
The currency 'CHF' - Swiss Franc.
|
static CurrencyUnit |
CurrencyUnit.EUR |
The currency 'EUR' - Euro.
|
static CurrencyUnit |
CurrencyUnit.GBP |
The currency 'GBP' - British pound.
|
static CurrencyUnit |
CurrencyUnit.JPY |
The currency 'JPY' - Japanese Yen.
|
static CurrencyUnit |
CurrencyUnit.USD |
The currency 'USD' - United States Dollar.
|
| Modifier and Type | Method | Description |
|---|---|---|
CurrencyUnit |
BigMoney.getCurrencyUnit() |
Gets the currency.
|
CurrencyUnit |
Money.getCurrencyUnit() |
Gets the currency.
|
CurrencyUnit |
CurrencyMismatchException.getFirstCurrency() |
Gets the first currency at fault.
|
CurrencyUnit |
CurrencyMismatchException.getSecondCurrency() |
Gets the second currency at fault.
|
static CurrencyUnit |
CurrencyUnit.of(java.lang.String currencyCode) |
Obtains an instance of
CurrencyUnit for the specified three letter currency code. |
static CurrencyUnit |
CurrencyUnit.of(java.util.Currency currency) |
Obtains an instance of
CurrencyUnit matching the specified JDK currency. |
static CurrencyUnit |
CurrencyUnit.of(java.util.Locale locale) |
Obtains an instance of
CurrencyUnit for the specified locale. |
static CurrencyUnit |
CurrencyUnit.ofCountry(java.lang.String countryCode) |
Obtains an instance of
CurrencyUnit for the specified ISO-3166 country code. |
static CurrencyUnit |
CurrencyUnit.ofNumericCode(int numericCurrencyCode) |
Obtains an instance of
CurrencyUnit for the specified ISO-4217 numeric currency code. |
static CurrencyUnit |
CurrencyUnit.ofNumericCode(java.lang.String numericCurrencyCode) |
Obtains an instance of
CurrencyUnit for the specified ISO-4217 numeric currency code. |
static CurrencyUnit |
CurrencyUnit.registerCurrency(java.lang.String currencyCode,
int numericCurrencyCode,
int decimalPlaces,
boolean force) |
Registers a currency allowing it to be used, allowing replacement.
|
static CurrencyUnit |
CurrencyUnit.registerCurrency(java.lang.String currencyCode,
int numericCurrencyCode,
int decimalPlaces,
java.util.List<java.lang.String> countryCodes) |
Registers a currency and associated countries allowing it to be used.
|
static CurrencyUnit |
CurrencyUnit.registerCurrency(java.lang.String currencyCode,
int numericCurrencyCode,
int decimalPlaces,
java.util.List<java.lang.String> countryCodes,
boolean force) |
Registers a currency and associated countries allowing it to be used, allowing replacement.
|
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.List<CurrencyUnit> |
CurrencyUnit.registeredCurrencies() |
Gets the list of all registered currencies.
|
| Modifier and Type | Method | Description |
|---|---|---|
int |
CurrencyUnit.compareTo(CurrencyUnit other) |
Compares this currency to another by alphabetical comparison of the code.
|
BigMoney |
BigMoney.convertedTo(CurrencyUnit currency,
java.math.BigDecimal conversionMultipler) |
Returns a copy of this monetary value converted into another currency
using the specified conversion rate.
|
Money |
Money.convertedTo(CurrencyUnit currency,
java.math.BigDecimal conversionMultipler,
java.math.RoundingMode roundingMode) |
Returns a copy of this monetary value converted into another currency
using the specified conversion rate, with a rounding mode used to adjust
the decimal places in the result.
|
BigMoney |
BigMoney.convertRetainScale(CurrencyUnit currency,
java.math.BigDecimal conversionMultipler,
java.math.RoundingMode roundingMode) |
Returns a copy of this monetary value converted into another currency
using the specified conversion rate, with a rounding mode used to adjust
the decimal places in the result.
|
static BigMoney |
BigMoney.of(CurrencyUnit currency,
double amount) |
Obtains an instance of
BigMoney from a double using a well-defined conversion. |
static BigMoney |
BigMoney.of(CurrencyUnit currency,
java.math.BigDecimal amount) |
Obtains an instance of
BigMoney from a BigDecimal. |
static Money |
Money.of(CurrencyUnit currency,
double amount) |
Obtains an instance of
Money from a double using a
well-defined conversion. |
static Money |
Money.of(CurrencyUnit currency,
double amount,
java.math.RoundingMode roundingMode) |
Obtains an instance of
Money from a double using a
well-defined conversion, rounding as necessary. |
static Money |
Money.of(CurrencyUnit currency,
java.math.BigDecimal amount) |
Obtains an instance of
Money from a BigDecimal. |
static Money |
Money.of(CurrencyUnit currency,
java.math.BigDecimal amount,
java.math.RoundingMode roundingMode) |
Obtains an instance of
Money from a BigDecimal, rounding as necessary. |
static BigMoney |
BigMoney.ofMajor(CurrencyUnit currency,
long amountMajor) |
Obtains an instance of
BigMoney from an amount in major units. |
static Money |
Money.ofMajor(CurrencyUnit currency,
long amountMajor) |
Obtains an instance of
Money from an amount in major units. |
static BigMoney |
BigMoney.ofMinor(CurrencyUnit currency,
long amountMinor) |
Obtains an instance of
BigMoney from an amount in minor units. |
static Money |
Money.ofMinor(CurrencyUnit currency,
long amountMinor) |
Obtains an instance of
Money from an amount in minor units. |
static BigMoney |
BigMoney.ofScale(CurrencyUnit currency,
long unscaledAmount,
int scale) |
Obtains an instance of
BigMoney from a scaled amount. |
static BigMoney |
BigMoney.ofScale(CurrencyUnit currency,
java.math.BigDecimal amount,
int scale) |
Obtains an instance of
BigMoney from a BigDecimal at a specific scale. |
static BigMoney |
BigMoney.ofScale(CurrencyUnit currency,
java.math.BigDecimal amount,
int scale,
java.math.RoundingMode roundingMode) |
Obtains an instance of
BigMoney from a double using a
well-defined conversion, rounding as necessary. |
static void |
CurrencyUnit.registerCountry(java.lang.String countryCode,
CurrencyUnit currency) |
Registers a country code, typically ISO 3166-1-alpha-2.
|
static BigMoney |
BigMoney.total(CurrencyUnit currency,
java.lang.Iterable<? extends BigMoneyProvider> monies) |
Obtains an instance of
Money as the total value of
a possibly empty collection. |
static BigMoney |
BigMoney.total(CurrencyUnit currency,
BigMoneyProvider... monies) |
Obtains an instance of
Money as the total value of
a possibly empty array. |
static Money |
Money.total(CurrencyUnit currency,
java.lang.Iterable<Money> monies) |
Obtains an instance of
Money as the total value of
a possibly empty collection. |
static Money |
Money.total(CurrencyUnit currency,
Money... monies) |
Obtains an instance of
Money as the total value of
a possibly empty array. |
BigMoney |
BigMoney.withCurrencyUnit(CurrencyUnit currency) |
Returns a copy of this monetary value with the specified currency.
|
Money |
Money.withCurrencyUnit(CurrencyUnit currency) |
Returns a copy of this monetary value with the specified currency.
|
Money |
Money.withCurrencyUnit(CurrencyUnit currency,
java.math.RoundingMode roundingMode) |
Returns a copy of this monetary value with the specified currency.
|
static BigMoney |
BigMoney.zero(CurrencyUnit currency) |
Obtains an instance of
BigMoney representing zero. |
static BigMoney |
BigMoney.zero(CurrencyUnit currency,
int scale) |
Obtains an instance of
BigMoney representing zero at a specific scale. |
static Money |
Money.zero(CurrencyUnit currency) |
Obtains an instance of
Money representing zero. |
| Constructor | Description |
|---|---|
CurrencyMismatchException(CurrencyUnit firstCurrency,
CurrencyUnit secondCurrency) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
CurrencyUnit |
MoneyParseContext.getCurrency() |
Gets the parsed currency.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
MoneyParseContext.setCurrency(CurrencyUnit currency) |
Sets the parsed currency.
|
Copyright © 2009–2018 Joda.org. All rights reserved.