Class FixedCouponBondTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
-
- com.opengamma.strata.product.bond.FixedCouponBondTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<FixedCouponBondTrade>
- Enclosing class:
- FixedCouponBondTrade
public static final class FixedCouponBondTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
The bean-builder forFixedCouponBondTrade.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FixedCouponBondTradebuild()Objectget(String propertyName)FixedCouponBondTrade.Builderinfo(TradeInfo info)Sets the additional trade information, defaulted to an empty instance.FixedCouponBondTrade.Builderprice(double price)Sets the clean price at which the bond was traded, in decimal form.FixedCouponBondTrade.Builderproduct(FixedCouponBond product)Sets the bond that was traded.FixedCouponBondTrade.Builderquantity(double quantity)Sets the quantity that was traded.FixedCouponBondTrade.Builderset(String propertyName, Object newValue)FixedCouponBondTrade.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<FixedCouponBondTrade>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
-
set
public FixedCouponBondTrade.Builder set(String propertyName, Object newValue)
-
set
public FixedCouponBondTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<FixedCouponBondTrade>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
-
build
public FixedCouponBondTrade build()
-
info
public FixedCouponBondTrade.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
FixedCouponBondTrade.resolve(ReferenceData).- Parameters:
info- the new value, not null- Returns:
- this, for chaining, not null
-
product
public FixedCouponBondTrade.Builder product(FixedCouponBond 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 FixedCouponBondTrade.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 FixedCouponBondTrade.Builder price(double price)
Sets the clean price at which the bond was traded, in decimal form.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:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<FixedCouponBondTrade>
-
-