| Package | Description |
|---|---|
| com.opengamma.strata.basics.currency |
Representations of currency and money.
|
| Modifier and Type | Method and Description |
|---|---|
CurrencyAmount |
FxMatrix.convert(CurrencyAmount amount,
Currency targetCurrency)
Converts a
CurrencyAmount into an amount in the specified
currency using the rates in this matrix. |
CurrencyAmount |
FxMatrix.convert(MultiCurrencyAmount amount,
Currency targetCurrency)
Converts a
MultipleCurrencyAmount into an amount in the
specified currency using the rates in this matrix. |
CurrencyAmount |
CurrencyAmount.convertedTo(Currency resultCurrency,
double fxRate)
Converts this amount to an equivalent amount the specified currency.
|
CurrencyAmount |
MultiCurrencyAmount.convertedTo(Currency resultCurrency,
FxRateProvider rateProvider)
Converts this amount to an equivalent amount the specified currency.
|
CurrencyAmount |
CurrencyAmount.convertedTo(Currency resultCurrency,
FxRateProvider rateProvider)
Converts this amount to an equivalent amount in the specified currency.
|
CurrencyAmount |
CurrencyAmountArray.get(int index)
Gets the amount at the specified index.
|
CurrencyAmount |
MultiCurrencyAmount.getAmount(Currency currency)
Gets the
CurrencyAmount for the specified currency, throwing an exception if not found. |
CurrencyAmount |
MultiCurrencyAmount.getAmountOrZero(Currency currency)
Gets the
CurrencyAmount for the specified currency, returning zero if not found. |
CurrencyAmount |
Payment.getValue()
Gets the amount of the payment.
|
CurrencyAmount |
AdjustablePayment.getValue()
Gets the amount of the payment.
|
CurrencyAmount |
CurrencyAmount.mapAmount(DoubleUnaryOperator mapper)
Applies an operation to the amount.
|
CurrencyAmount |
CurrencyAmount.minus(CurrencyAmount amountToSubtract)
Returns a copy of this
CurrencyAmount with the specified amount subtracted. |
CurrencyAmount |
CurrencyAmount.minus(double amountToSubtract)
Returns a copy of this
CurrencyAmount with the specified amount subtracted. |
CurrencyAmount |
CurrencyAmount.multipliedBy(double valueToMultiplyBy)
Returns a copy of this
CurrencyAmount with the amount multiplied. |
CurrencyAmount |
CurrencyAmount.negated()
Returns a copy of this
CurrencyAmount with the amount negated. |
CurrencyAmount |
CurrencyAmount.negative()
Returns a copy of this
CurrencyAmount with a negative amount. |
static CurrencyAmount |
CurrencyAmount.of(Currency currency,
double amount)
Obtains an instance of
CurrencyAmount for the specified currency and amount. |
static CurrencyAmount |
CurrencyAmount.of(String currencyCode,
double amount)
Obtains an instance of
CurrencyAmount for the specified ISO-4217
three letter currency code and amount. |
static CurrencyAmount |
CurrencyAmount.parse(String amountStr)
Parses the string to produce a
CurrencyAmount. |
CurrencyAmount |
CurrencyAmount.plus(CurrencyAmount amountToAdd)
Returns a copy of this
CurrencyAmount with the specified amount added. |
CurrencyAmount |
CurrencyAmount.plus(double amountToAdd)
Returns a copy of this
CurrencyAmount with the specified amount added. |
CurrencyAmount |
CurrencyAmount.positive()
Returns a copy of this
CurrencyAmount with a positive amount. |
CurrencyAmount |
Money.toCurrencyAmount()
Converts this monetary amount to the equivalent
CurrencyAmount. |
CurrencyAmount |
BigMoney.toCurrencyAmount()
Converts this monetary amount to the equivalent
CurrencyAmount. |
static CurrencyAmount |
CurrencyAmount.zero(Currency currency)
Obtains a zero amount instance of
CurrencyAmount for the specified currency. |
| Modifier and Type | Method and Description |
|---|---|
org.joda.beans.MetaProperty<ImmutableSortedSet<CurrencyAmount>> |
MultiCurrencyAmount.Meta.amounts()
The meta-property for the
amounts property. |
ImmutableSortedSet<CurrencyAmount> |
MultiCurrencyAmount.getAmounts()
Gets the set of currency amounts.
|
Stream<CurrencyAmount> |
MultiCurrencyAmount.stream()
Returns a stream over the currency amounts.
|
Stream<CurrencyAmount> |
CurrencyAmountArray.stream()
Returns a stream of the amounts.
|
static Collector<CurrencyAmount,?,MultiCurrencyAmount> |
MultiCurrencyAmount.toMultiCurrencyAmount()
Returns a collector that can be used to create a multi-currency amount from a stream of amounts.
|
org.joda.beans.MetaProperty<CurrencyAmount> |
Payment.Meta.value()
The meta-property for the
value property. |
org.joda.beans.MetaProperty<CurrencyAmount> |
AdjustablePayment.Meta.value()
The meta-property for the
value property. |
| Modifier and Type | Method and Description |
|---|---|
int |
CurrencyAmount.compareTo(CurrencyAmount other)
Compares this currency amount to another.
|
CurrencyAmount |
FxMatrix.convert(CurrencyAmount amount,
Currency targetCurrency)
Converts a
CurrencyAmount into an amount in the specified
currency using the rates in this matrix. |
MultiCurrencyAmount |
MultiCurrencyAmount.minus(CurrencyAmount amountToSubtract)
Returns a copy of this
MultiCurrencyAmount with the specified amount subtracted. |
CurrencyAmountArray |
CurrencyAmountArray.minus(CurrencyAmount amount)
Returns a new array containing the values from this array with the specified amount subtracted.
|
CurrencyAmount |
CurrencyAmount.minus(CurrencyAmount amountToSubtract)
Returns a copy of this
CurrencyAmount with the specified amount subtracted. |
static MultiCurrencyAmount |
MultiCurrencyAmount.of(CurrencyAmount... amounts)
Obtains an instance from an array of
CurrencyAmount objects. |
static Money |
Money.of(CurrencyAmount currencyAmount)
Obtains an instance of
Money for the specified CurrencyAmount. |
static BigMoney |
BigMoney.of(CurrencyAmount currencyAmount)
Obtains an instance of
BigMoney for the specified CurrencyAmount. |
static AdjustablePayment |
AdjustablePayment.of(CurrencyAmount value,
AdjustableDate date)
Obtains an instance representing an amount where the date is adjustable.
|
static Payment |
Payment.of(CurrencyAmount value,
LocalDate date)
Obtains an instance representing an amount.
|
static AdjustablePayment |
AdjustablePayment.of(CurrencyAmount value,
LocalDate date)
Obtains an instance representing an amount where the date is fixed.
|
static AdjustablePayment |
AdjustablePayment.ofPay(CurrencyAmount value,
AdjustableDate date)
Obtains an instance representing an amount to be paid where the date is adjustable.
|
static Payment |
Payment.ofPay(CurrencyAmount value,
LocalDate date)
Obtains an instance representing an amount to be paid.
|
static AdjustablePayment |
AdjustablePayment.ofPay(CurrencyAmount value,
LocalDate date)
Obtains an instance representing an amount to be paid where the date is fixed.
|
static AdjustablePayment |
AdjustablePayment.ofReceive(CurrencyAmount value,
AdjustableDate date)
Obtains an instance representing an amount to be received where the date is adjustable.
|
static Payment |
Payment.ofReceive(CurrencyAmount value,
LocalDate date)
Obtains an instance representing an amount to be received.
|
static AdjustablePayment |
AdjustablePayment.ofReceive(CurrencyAmount value,
LocalDate date)
Obtains an instance representing an amount to be received where the date is fixed.
|
MultiCurrencyAmount |
MultiCurrencyAmount.plus(CurrencyAmount amountToAdd)
Returns a copy of this
MultiCurrencyAmount with the specified amount added. |
CurrencyAmountArray |
CurrencyAmountArray.plus(CurrencyAmount amount)
Returns a new array containing the values from this array with the specified amount added.
|
CurrencyAmount |
CurrencyAmount.plus(CurrencyAmount amountToAdd)
Returns a copy of this
CurrencyAmount with the specified amount added. |
Payment.Builder |
Payment.Builder.value(CurrencyAmount value)
Sets the amount of the payment.
|
| Modifier and Type | Method and Description |
|---|---|
MultiCurrencyAmount |
MultiCurrencyAmount.mapCurrencyAmounts(UnaryOperator<CurrencyAmount> operator)
Applies an operation to the currency amounts.
|
static CurrencyAmountArray |
CurrencyAmountArray.of(int size,
IntFunction<CurrencyAmount> valueFunction)
Obtains an instance using a function to create the entries.
|
static MultiCurrencyAmount |
MultiCurrencyAmount.of(Iterable<CurrencyAmount> amounts)
Obtains an instance from a list of
CurrencyAmount objects. |
static CurrencyAmountArray |
CurrencyAmountArray.of(List<CurrencyAmount> amounts)
Obtains an instance from the specified list of amounts.
|
static MultiCurrencyAmount |
MultiCurrencyAmount.total(Iterable<CurrencyAmount> amounts)
Obtains an instance from the total of a list of
CurrencyAmount objects. |
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.