Class CmsTrade.Builder

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

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

      • get

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

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

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

        public CmsTrade.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 CmsTrade.Builder product​(Cms product)
        Sets the CMS product that was agreed when the trade occurred.

        The product captures the contracted financial details of the trade.

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

        public CmsTrade.Builder premium​(AdjustablePayment premium)
        Sets the optional premium of the product.

        For certain CMS products, a premium is paid upfront. This typically occurs instead of periodic payments based on fixed or Ibor rates over the lifetime of the product.

        The premium sign must be compatible with the product Pay/Receive flag.

        Parameters:
        premium - the new value
        Returns:
        this, for chaining, not null
      • toString

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