Class ResolvedBondFutureTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureTrade>
-
- com.opengamma.strata.product.bond.ResolvedBondFutureTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<ResolvedBondFutureTrade>
- Enclosing class:
- ResolvedBondFutureTrade
public static final class ResolvedBondFutureTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureTrade>
The bean-builder forResolvedBondFutureTrade.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResolvedBondFutureTradebuild()Objectget(String propertyName)ResolvedBondFutureTrade.Builderinfo(PortfolioItemInfo info)Sets the additional information, defaulted to an empty instance.ResolvedBondFutureTrade.Builderproduct(ResolvedBondFuture product)Sets the future that was traded.ResolvedBondFutureTrade.Builderquantity(double quantity)Sets the quantity that was traded.ResolvedBondFutureTrade.Builderset(String propertyName, Object newValue)ResolvedBondFutureTrade.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()ResolvedBondFutureTrade.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<ResolvedBondFutureTrade>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureTrade>
-
set
public ResolvedBondFutureTrade.Builder set(String propertyName, Object newValue)
-
set
public ResolvedBondFutureTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<ResolvedBondFutureTrade>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedBondFutureTrade>
-
build
public ResolvedBondFutureTrade build()
-
info
public ResolvedBondFutureTrade.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 ResolvedBondFutureTrade.Builder product(ResolvedBondFuture product)
Sets the future 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 ResolvedBondFutureTrade.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 ResolvedBondFutureTrade.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 in the trade model, pricers and market data. This is coherent with the pricing of
FixedCouponBond. The bond futures delivery is a bond for an amount computed from the bond future price, a conversion factor and the accrued interest.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<ResolvedBondFutureTrade>
-
-