Package com.opengamma.strata.product
Interface SecurityQuantityTrade
-
- All Superinterfaces:
CalculationTarget,PortfolioItem,SecurityQuantity,Trade
- All Known Subinterfaces:
EtdTrade,ResolvableSecurityTrade,SecuritizedProductTrade<P>
- All Known Implementing Classes:
BillTrade,BondFutureOptionTrade,BondFutureTrade,CapitalIndexedBondTrade,DsfTrade,EtdFutureTrade,EtdOptionTrade,FixedCouponBondTrade,GenericSecurityTrade,IborFutureOptionTrade,IborFutureTrade,OvernightFutureTrade,SecurityTrade
public interface SecurityQuantityTrade extends Trade, SecurityQuantity
A trade that is based on security, quantity and price.If the trade is directly based on a securitized product, the trade type is
SecuritizedProductTrade. If not, the financial instrument involved in the trade is represented in alternative form, e.g.,Security. See individual implementations for more details.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description doublegetPrice()Gets the price that was traded.SecurityQuantityTradewithInfo(PortfolioItemInfo info)Returns an instance with the specified info.SecurityQuantityTradewithPrice(double price)Returns an instance with the specified price.SecurityQuantityTradewithQuantity(double quantity)Returns an instance with the specified quantity.-
Methods inherited from interface com.opengamma.strata.product.PortfolioItem
getId
-
Methods inherited from interface com.opengamma.strata.product.SecurityQuantity
getQuantity, getSecurityId
-
-
-
-
Method Detail
-
getPrice
double getPrice()
Gets the price that was traded.This is the unit price agreed when the trade occurred.
- Returns:
- the price
-
withInfo
SecurityQuantityTrade withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.- Specified by:
withInfoin interfacePortfolioItem- Specified by:
withInfoin interfaceTrade- Parameters:
info- the new info- Returns:
- the instance with the specified info
-
withQuantity
SecurityQuantityTrade withQuantity(double quantity)
Returns an instance with the specified quantity.- Parameters:
quantity- the new quantity- Returns:
- the instance with the specified quantity
-
withPrice
SecurityQuantityTrade withPrice(double price)
Returns an instance with the specified price.- Parameters:
price- the new price- Returns:
- the instance with the specified price
-
-