Class SwaptionTrade.Builder

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

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

      • get

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

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

        public SwaptionTrade.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 SwaptionTrade.Builder product​(Swaption product)
        Sets the swaption 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 SwaptionTrade.Builder premium​(AdjustablePayment premium)
        Sets the premium of the swaption.

        The premium sign should be compatible with the product Long/Short flag. This means that the premium is negative for long and positive for short.

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

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