Class ResolvedBondFutureOptionTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOptionTrade>
-
- com.opengamma.strata.product.bond.ResolvedBondFutureOptionTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ResolvedBondFutureOptionTrade>
- Enclosing class:
- ResolvedBondFutureOptionTrade
public static final class ResolvedBondFutureOptionTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOptionTrade>
The bean-builder forResolvedBondFutureOptionTrade.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedBondFutureOptionTradebuild()Objectget(String propertyName)ResolvedBondFutureOptionTrade.Builderinfo(PortfolioItemInfo info)Sets the additional information, defaulted to an empty instance.ResolvedBondFutureOptionTrade.Builderproduct(ResolvedBondFutureOption product)Sets the option that was traded.ResolvedBondFutureOptionTrade.Builderquantity(double quantity)Sets the quantity that was traded.ResolvedBondFutureOptionTrade.Builderset(String propertyName, Object newValue)ResolvedBondFutureOptionTrade.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()ResolvedBondFutureOptionTrade.BuildertradedPrice(TradedPrice tradedPrice)Sets the price that was traded, together with the trade date, optional.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<ResolvedBondFutureOptionTrade>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOptionTrade>
-
set
public ResolvedBondFutureOptionTrade.Builder set(String propertyName, Object newValue)
-
set
public ResolvedBondFutureOptionTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<ResolvedBondFutureOptionTrade>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOptionTrade>
-
build
public ResolvedBondFutureOptionTrade build()
-
info
public ResolvedBondFutureOptionTrade.Builder info(PortfolioItemInfo info)
Sets the additional information, defaulted to an empty instance.This allows additional information to be attached.
- Parameters:
info- the new value, not null- Returns:
- this, for chaining, not null
-
product
public ResolvedBondFutureOptionTrade.Builder product(ResolvedBondFutureOption product)
Sets the option 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 ResolvedBondFutureOptionTrade.Builder quantity(double quantity)
Sets the quantity that was traded.This is the number of contracts that were traded. This will be positive if buying and negative if selling.
- Parameters:
quantity- the new value- Returns:
- this, for chaining, not null
-
tradedPrice
public ResolvedBondFutureOptionTrade.Builder tradedPrice(TradedPrice tradedPrice)
Sets the price that was traded, together with the trade date, optional.This is the price agreed when the trade occurred, in decimal form. Strata uses decimal prices for bond futures options in the trade model, pricers and market data. This is coherent with the pricing of
BondFuture.This is optional to allow the class to be used to price both trades and positions. When the instance represents a trade, the traded price should be present. When the instance represents a position, the traded price should be empty.
- Parameters:
tradedPrice- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureOptionTrade>
-
-