Package com.opengamma.strata.product
Class SecurityTrade.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
-
- com.opengamma.strata.product.SecurityTrade.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<SecurityTrade>
- Enclosing class:
- SecurityTrade
public static final class SecurityTrade.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
The bean-builder forSecurityTrade.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityTradebuild()Objectget(String propertyName)SecurityTrade.Builderinfo(TradeInfo info)Sets the additional trade information, defaulted to an empty instance.SecurityTrade.Builderprice(double price)Sets the price agreed when the trade occurred.SecurityTrade.Builderquantity(double quantity)Sets the quantity that was traded.SecurityTrade.BuildersecurityId(SecurityId securityId)Sets the identifier of the security that was traded.SecurityTrade.Builderset(String propertyName, Object newValue)SecurityTrade.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<SecurityTrade>- Overrides:
getin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
-
set
public SecurityTrade.Builder set(String propertyName, Object newValue)
-
set
public SecurityTrade.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
setin interfaceorg.joda.beans.BeanBuilder<SecurityTrade>- Overrides:
setin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
-
build
public SecurityTrade build()
-
info
public SecurityTrade.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
-
securityId
public SecurityTrade.Builder securityId(SecurityId securityId)
Sets the identifier of the security that was traded.This identifier uniquely identifies the security within the system.
- Parameters:
securityId- the new value, not null- Returns:
- this, for chaining, not null
-
quantity
public SecurityTrade.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 SecurityTrade.Builder price(double price)
Sets the price agreed when the trade occurred.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:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
-
-