Class BondFutureTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureTrade>
-
- com.opengamma.strata.product.bond.BondFutureTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<BondFutureTrade>
- Enclosing class:
- BondFutureTrade
public static final class BondFutureTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureTrade>
The bean-builder forBondFutureTrade
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BondFutureTrade
build()
Object
get(String propertyName)
BondFutureTrade.Builder
info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.BondFutureTrade.Builder
price(double price)
Sets the price that was traded, in decimal form.BondFutureTrade.Builder
product(BondFuture product)
Sets the future that was traded.BondFutureTrade.Builder
quantity(double quantity)
Sets the quantity that was traded.BondFutureTrade.Builder
set(String propertyName, Object newValue)
BondFutureTrade.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<BondFutureTrade>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureTrade>
-
set
public BondFutureTrade.Builder set(String propertyName, Object newValue)
-
set
public BondFutureTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<BondFutureTrade>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureTrade>
-
build
public BondFutureTrade build()
-
info
public BondFutureTrade.Builder info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.This allows additional information to be attached to the trade. The trade date is required when calling
BondFutureTrade.resolve(ReferenceData)
.- Parameters:
info
- the new value, not null- Returns:
- this, for chaining, not null
-
product
public BondFutureTrade.Builder product(BondFuture 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 BondFutureTrade.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
-
price
public BondFutureTrade.Builder price(double price)
Sets the price that was traded, in decimal form.This is the price agreed when the trade occurred.
- Parameters:
price
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<BondFutureTrade>
-
-