Class BillTrade.Builder

  • All Implemented Interfaces:
    org.joda.beans.BeanBuilder<BillTrade>
    Enclosing class:
    BillTrade

    public static final class BillTrade.Builder
    extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillTrade>
    The bean-builder for BillTrade.
    • Method Detail

      • get

        public Object get​(String propertyName)
        Specified by:
        get in interface org.joda.beans.BeanBuilder<BillTrade>
        Overrides:
        get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillTrade>
      • set

        public BillTrade.Builder set​(org.joda.beans.MetaProperty<?> property,
                                     Object value)
        Specified by:
        set in interface org.joda.beans.BeanBuilder<BillTrade>
        Overrides:
        set in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillTrade>
      • 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
      • toString

        public String toString()
        Overrides:
        toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<BillTrade>