Class SecurityTrade.Builder

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

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

      • get

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

        public SecurityTrade.Builder set​(org.joda.beans.MetaProperty<?> property,
                                         Object value)
        Specified by:
        set in interface org.joda.beans.BeanBuilder<SecurityTrade>
        Overrides:
        set in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<SecurityTrade>
      • info

        public SecurityTrade.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
      • securityId

        public SecurityTrade.Builder securityId​(SecurityId securityId)
        Sets the identifier of the security that was traded.

        This identifier uniquely identifies the security within the system.

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

        public SecurityTrade.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 SecurityTrade.Builder price​(double price)
        Sets the price agreed when the trade occurred.

        This is the price agreed when the trade occurred.

        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<SecurityTrade>