Class BillTrade.Builder

    • Method Detail

      • set

        public BillTrade.Builder set​(java.lang.String propertyName,
                                     java.lang.Object newValue)
      • info

        public BillTrade.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 BillTrade.Builder product​(Bill product)
        Sets the bill that was traded.

        The product captures the contracted financial details of the trade.

        Parameters:
        product - the new value, not null
        Returns:
        this, for chaining, not null
      • quantity

        public BillTrade.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 BillTrade.Builder price​(double price)
        Sets the price at which the bill was traded, in decimal form.
        Parameters:
        price - the new value
        Returns:
        this, for chaining, not null