Class CapitalIndexedBondTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondTrade>
-
- com.opengamma.strata.product.bond.CapitalIndexedBondTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<CapitalIndexedBondTrade>
- Enclosing class:
- CapitalIndexedBondTrade
public static final class CapitalIndexedBondTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondTrade>
The bean-builder forCapitalIndexedBondTrade
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CapitalIndexedBondTrade
build()
Object
get(String propertyName)
CapitalIndexedBondTrade.Builder
info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.CapitalIndexedBondTrade.Builder
price(double price)
Sets the clean price at which the bond was traded.CapitalIndexedBondTrade.Builder
product(CapitalIndexedBond product)
Sets the bond that was traded.CapitalIndexedBondTrade.Builder
quantity(double quantity)
Sets the quantity that was traded.CapitalIndexedBondTrade.Builder
set(String propertyName, Object newValue)
CapitalIndexedBondTrade.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<CapitalIndexedBondTrade>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondTrade>
-
set
public CapitalIndexedBondTrade.Builder set(String propertyName, Object newValue)
-
set
public CapitalIndexedBondTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<CapitalIndexedBondTrade>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondTrade>
-
build
public CapitalIndexedBondTrade build()
-
info
public CapitalIndexedBondTrade.Builder info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.This allows additional information to be attached to the trade. Either the trade or settlement date is required when calling
CapitalIndexedBondTrade.resolve(ReferenceData)
.- Parameters:
info
- the new value, not null- Returns:
- this, for chaining, not null
-
product
public CapitalIndexedBondTrade.Builder product(CapitalIndexedBond product)
Sets the bond that was traded.The product captures the contracted financial details of the trade.
- Parameters:
product
- the new value, not null- Returns:
- this, for chaining, not null
-
quantity
public CapitalIndexedBondTrade.Builder quantity(double quantity)
Sets the quantity that was traded.This will be positive if buying and negative if selling.
- Parameters:
quantity
- the new value- Returns:
- this, for chaining, not null
-
price
public CapitalIndexedBondTrade.Builder price(double price)
Sets the clean price at which the bond was traded.The "clean" price excludes any accrued interest.
Strata uses decimal prices for bonds in the trade model, pricers and market data. For example, a price of 99.32% is represented in Strata by 0.9932.
- Parameters:
price
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondTrade>
-
-