Class LegAmounts
- java.lang.Object
-
- com.opengamma.strata.market.amount.LegAmounts
-
- All Implemented Interfaces:
FxConvertible<LegAmounts>
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class LegAmounts extends Object implements FxConvertible<LegAmounts>, org.joda.beans.ImmutableBean, Serializable
A collection of leg amounts.Contains a list of individual leg amount objects, each representing an amount associated with one leg of an instrument. The order of the list is expected to be the same as the order in which the legs are defined on the instrument.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LegAmounts.Meta
The meta-bean forLegAmounts
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LegAmounts
convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
Converts this instance to an equivalent amount in the specified currency.boolean
equals(Object obj)
ImmutableList<LegAmount>
getAmounts()
Gets the leg amounts.int
hashCode()
static LegAmounts.Meta
meta()
The meta-bean forLegAmounts
.LegAmounts.Meta
metaBean()
static LegAmounts
of(LegAmount... amounts)
Returns an instance containing the specified leg amounts.static LegAmounts
of(List<LegAmount> amounts)
Returns an instance containing the specified leg amounts.String
toString()
-
-
-
Method Detail
-
of
public static LegAmounts of(List<LegAmount> amounts)
Returns an instance containing the specified leg amounts.- Parameters:
amounts
- the individual leg amounts- Returns:
- an instance containing the specified leg amounts
-
of
public static LegAmounts of(LegAmount... amounts)
Returns an instance containing the specified leg amounts.- Parameters:
amounts
- the individual leg amounts- Returns:
- an instance containing the specified leg amounts
-
convertedTo
public LegAmounts convertedTo(Currency resultCurrency, FxRateProvider rateProvider)
Description copied from interface:FxConvertible
Converts this instance to an equivalent amount in the specified currency.The result, which may be of a different type, will be expressed in terms of the given currency. Any FX conversion that is required will use rates from the provider.
- Specified by:
convertedTo
in interfaceFxConvertible<LegAmounts>
- Parameters:
resultCurrency
- the currency of the resultrateProvider
- the provider of FX rates- Returns:
- the converted instance, which should be expressed in the specified currency
-
meta
public static LegAmounts.Meta meta()
The meta-bean forLegAmounts
.- Returns:
- the meta-bean, not null
-
metaBean
public LegAmounts.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getAmounts
public ImmutableList<LegAmount> getAmounts()
Gets the leg amounts.- Returns:
- the value of the property, not null
-
-