Class CdsTrade.Builder

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

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

      • get

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

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

        public CdsTrade.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 CdsTrade.Builder product​(Cds product)
        Sets the CDS 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
      • upfrontFee

        public CdsTrade.Builder upfrontFee​(AdjustablePayment upfrontFee)
        Sets the upfront fee of the product.

        This specifies a single amount payable by the buyer to the seller. Thus the sign must be compatible with the product Pay/Receive flag.

        Some CDSs, especially legacy products, are traded at par and the upfront fee is not paid.

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

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