public final class EtdFutureTrade extends Object implements EtdTrade, ResolvableSecurityTrade, org.joda.beans.ImmutableBean, Serializable
A trade in an underlying EtdFutureSecurity.
| Modifier and Type | Class and Description |
|---|---|
static class |
EtdFutureTrade.Builder
The bean-builder for
EtdFutureTrade. |
static class |
EtdFutureTrade.Meta
The meta-bean for
EtdFutureTrade. |
| Modifier and Type | Method and Description |
|---|---|
static EtdFutureTrade.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
TradeInfo |
getInfo()
Gets the additional trade information, defaulted to an empty instance.
|
double |
getPrice()
Gets the price that was traded, in decimal form.
|
double |
getQuantity()
Gets the quantity that was traded.
|
EtdFutureSecurity |
getSecurity()
Gets the security that was traded.
|
int |
hashCode() |
static EtdFutureTrade.Meta |
meta()
The meta-bean for
EtdFutureTrade. |
EtdFutureTrade.Meta |
metaBean() |
static EtdFutureTrade |
of(TradeInfo tradeInfo,
EtdFutureSecurity security,
double quantity,
double price)
Obtains an instance from trade information, security, quantity and price.
|
PortfolioItemSummary |
summarize()
Summarizes the portfolio item.
|
EtdFutureTrade.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
EtdFutureTrade |
withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.
|
EtdFutureTrade |
withPrice(double price)
Returns an instance with the specified price.
|
EtdFutureTrade |
withQuantity(double quantity)
Returns an instance with the specified quantity.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCurrency, getSecurityId, getTyperesolveTargetgetIdpublic static EtdFutureTrade of(TradeInfo tradeInfo, EtdFutureSecurity security, double quantity, double price)
tradeInfo - the trade informationsecurity - the security that was tradedquantity - the quantity that was tradedprice - the price that was tradedpublic PortfolioItemSummary summarize()
PortfolioItemThis provides a summary, including a human readable description.
summarize in interface PortfolioItemsummarize in interface Tradepublic EtdFutureTrade withInfo(PortfolioItemInfo info)
SecurityQuantityTradewithInfo in interface PortfolioItemwithInfo in interface ResolvableSecurityTradewithInfo in interface SecurityQuantityTradewithInfo in interface Tradeinfo - the new infopublic EtdFutureTrade withQuantity(double quantity)
SecurityQuantityTradewithQuantity in interface ResolvableSecurityTradewithQuantity in interface SecurityQuantityTradequantity - the new quantitypublic EtdFutureTrade withPrice(double price)
SecurityQuantityTradewithPrice in interface ResolvableSecurityTradewithPrice in interface SecurityQuantityTradeprice - the new pricepublic static EtdFutureTrade.Meta meta()
EtdFutureTrade.public static EtdFutureTrade.Builder builder()
public EtdFutureTrade.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic TradeInfo getInfo()
This allows additional information to be attached to the trade.
getInfo in interface PortfolioItemgetInfo in interface Tradepublic EtdFutureSecurity getSecurity()
getSecurity in interface EtdTradepublic double getQuantity()
This is the number of contracts that were traded. This will be positive if buying and negative if selling.
getQuantity in interface SecurityQuantitypublic double getPrice()
This is the price agreed when the trade occurred.
getPrice in interface SecurityQuantityTradepublic EtdFutureTrade.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.