Class EtdFutureTrade

    • Method Detail

      • of

        public static EtdFutureTrade of​(TradeInfo tradeInfo,
                                        EtdFutureSecurity security,
                                        double quantity,
                                        double price)
        Obtains an instance from trade information, security, quantity and price.
        tradeInfo - the trade information
        security - the security that was traded
        quantity - the quantity that was traded
        price - the price that was traded
        the trade
      • meta

        public static EtdFutureTrade.Meta meta()
        The meta-bean for EtdFutureTrade.
        the meta-bean, not null
      • builder

        public static EtdFutureTrade.Builder builder()
        Returns a builder used to create an instance of the bean.
        the builder, not null
      • metaBean

        public EtdFutureTrade.Meta metaBean()
        Specified by:
        metaBean in interface org.joda.beans.Bean
      • getInfo

        public TradeInfo getInfo()
        Gets the additional trade information, defaulted to an empty instance.

        This allows additional information to be attached to the trade.

        Specified by:
        getInfo in interface PortfolioItem
        Specified by:
        getInfo in interface Trade
        the value of the property, not null
      • getSecurity

        public EtdFutureSecurity getSecurity()
        Gets the security that was traded.
        Specified by:
        getSecurity in interface EtdTrade
        the value of the property, not null
      • getQuantity

        public double getQuantity()
        Gets the quantity that was traded.

        This is the number of contracts that were traded. This will be positive if buying and negative if selling.

        Specified by:
        getQuantity in interface SecurityQuantity
        the value of the property
      • getPrice

        public double getPrice()
        Gets the price that was traded, in decimal form.

        This is the price agreed when the trade occurred.

        Specified by:
        getPrice in interface SecurityQuantityTrade
        the value of the property
      • toBuilder

        public EtdFutureTrade.Builder toBuilder()
        Returns a builder that allows this bean to be mutated.
        the mutable builder, not null
      • hashCode

        public int hashCode()
        hashCode in class Object