| Package | Description |
|---|---|
| com.opengamma.strata.basics.currency |
Representations of currency and money.
|
| Modifier and Type | Method and Description |
|---|---|
Money |
Money.convertedTo(Currency resultCurrency,
BigDecimal fxRate)
Converts this amount to an equivalent amount the specified currency.
|
Money |
Money.convertedTo(Currency resultCurrency,
Decimal fxRate)
Converts this amount to an equivalent amount the specified currency.
|
Money |
Money.convertedTo(Currency resultCurrency,
FxRateProvider rateProvider)
Converts this amount to an equivalent amount in the specified currency.
|
Money |
Money.map(UnaryOperator<Decimal> mapper)
Applies an operation to the amount.
|
Money |
Money.mapAmount(UnaryOperator<BigDecimal> mapper)
Deprecated.
Use
map(UnaryOperator), potentially using a lambda decimal -> decimal.mapAsBigDecimal(mapper) |
Money |
Money.minus(Money amountToSubtract)
Returns a copy of this
Money with the specified amount subtracted. |
Money |
Money.multipliedBy(long valueToMultiplyBy)
Returns a copy of this
Money with the amount multiplied. |
Money |
Money.negated()
Returns a copy of this
Money with the amount negated. |
Money |
Money.negative()
Returns a copy of this
Money with a negative amount. |
static Money |
Money.of(BigMoney money)
Obtains an instance of
Money for the specified BigMoney. |
static Money |
Money.of(CurrencyAmount currencyAmount)
Obtains an instance of
Money for the specified CurrencyAmount. |
static Money |
Money.of(Currency currency,
BigDecimal amount)
Obtains an instance of
Money for the specified currency and amount. |
static Money |
Money.of(Currency currency,
Decimal amount)
Obtains an instance of
Money for the specified currency and amount. |
static Money |
Money.of(Currency currency,
double amount)
Obtains an instance of
Money for the specified currency and amount. |
static Money |
Money.parse(String amountStr)
Parses the string to produce a
Money. |
Money |
Money.plus(Money amountToAdd)
Returns a copy of this
Money with the specified amount added. |
Money |
Money.positive()
Returns a copy of this
Money with a positive amount. |
Money |
CurrencyAmount.toMoney()
Converts this monetary amount to the equivalent
Money. |
Money |
BigMoney.toMoney()
Converts this monetary amount to the equivalent
Money. |
static Money |
Money.zero(Currency currency)
Obtains a zero amount instance of
Money for the specified currency. |
| Modifier and Type | Method and Description |
|---|---|
int |
Money.compareTo(Money other)
Compares this money to another.
|
Money |
Money.minus(Money amountToSubtract)
Returns a copy of this
Money with the specified amount subtracted. |
static BigMoney |
BigMoney.of(Money money)
Obtains an instance of
BigMoney for the specified Money. |
Money |
Money.plus(Money amountToAdd)
Returns a copy of this
Money with the specified amount added. |
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.