Class CdsIndexTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CdsIndexTrade>
-
- com.opengamma.strata.product.credit.CdsIndexTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<CdsIndexTrade>
- Enclosing class:
- CdsIndexTrade
public static final class CdsIndexTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CdsIndexTrade>
The bean-builder forCdsIndexTrade
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CdsIndexTrade
build()
Object
get(String propertyName)
CdsIndexTrade.Builder
info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.CdsIndexTrade.Builder
product(CdsIndex product)
Sets the CDS index product that was agreed when the trade occurred.CdsIndexTrade.Builder
set(String propertyName, Object newValue)
CdsIndexTrade.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
CdsIndexTrade.Builder
upfrontFee(AdjustablePayment upfrontFee)
Sets the upfront fee of the product.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<CdsIndexTrade>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CdsIndexTrade>
-
set
public CdsIndexTrade.Builder set(String propertyName, Object newValue)
-
set
public CdsIndexTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<CdsIndexTrade>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CdsIndexTrade>
-
build
public CdsIndexTrade build()
-
info
public CdsIndexTrade.Builder info(TradeInfo info)
Sets the additional trade information, defaulted to an empty instance.This allows additional information to be attached to the trade.
- Parameters:
info
- the new value, not null- Returns:
- this, for chaining, not null
-
product
public CdsIndexTrade.Builder product(CdsIndex product)
Sets the CDS index product that was agreed when the trade occurred.The product captures the contracted financial details of the trade.
- Parameters:
product
- the new value, not null- Returns:
- this, for chaining, not null
-
upfrontFee
public CdsIndexTrade.Builder upfrontFee(AdjustablePayment upfrontFee)
Sets the upfront fee of the product.This specifies a single amount payable by the buyer to the seller. Thus the sign must be compatible with the product Pay/Receive flag.
Some CDSs, especially legacy products, are traded at par and the upfront fee is not paid.
- Parameters:
upfrontFee
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CdsIndexTrade>
-
-