예제 #1
0
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 116685664:         // longShort
                    this.longShort_Renamed = (LongShort)newValue;
                    break;

                case -1937554512:         // swaptionSettlement
                    this.swaptionSettlement_Renamed = (SwaptionSettlement)newValue;
                    break;

                case -816738431:         // expiryDate
                    this.expiryDate_Renamed = (AdjustableDate)newValue;
                    break;

                case -816254304:         // expiryTime
                    this.expiryTime_Renamed = (LocalTime)newValue;
                    break;

                case -816069761:         // expiryZone
                    this.expiryZone_Renamed = (ZoneId)newValue;
                    break;

                case -1770633379:         // underlying
                    this.underlying_Renamed = (Swap)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 116685664:         // longShort
                    this.longShort_Renamed = (LongShort)newValue;
                    break;

                case -1937554512:         // swaptionSettlement
                    this.swaptionSettlement_Renamed = (SwaptionSettlement)newValue;
                    break;

                case -1289159373:         // expiry
                    this.expiry_Renamed = (ZonedDateTime)newValue;
                    break;

                case -1770633379:         // underlying
                    this.underlying_Renamed = (ResolvedSwap)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 /// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(ResolvedSwaption beanToCopy)
 {
     this.longShort_Renamed          = beanToCopy.LongShort;
     this.swaptionSettlement_Renamed = beanToCopy.SwaptionSettlement;
     this.expiry_Renamed             = beanToCopy.Expiry;
     this.underlying_Renamed         = beanToCopy.Underlying;
 }
예제 #4
0
 /// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(Swaption beanToCopy)
 {
     this.longShort_Renamed          = beanToCopy.LongShort;
     this.swaptionSettlement_Renamed = beanToCopy.SwaptionSettlement;
     this.expiryDate_Renamed         = beanToCopy.ExpiryDate;
     this.expiryTime_Renamed         = beanToCopy.ExpiryTime;
     this.expiryZone_Renamed         = beanToCopy.ExpiryZone;
     this.underlying_Renamed         = beanToCopy.Underlying;
 }
 private ResolvedSwaption(LongShort longShort, SwaptionSettlement swaptionSettlement, ZonedDateTime expiry, ResolvedSwap underlying)
 {
     JodaBeanUtils.notNull(longShort, "longShort");
     JodaBeanUtils.notNull(swaptionSettlement, "swaptionSettlement");
     JodaBeanUtils.notNull(expiry, "expiry");
     JodaBeanUtils.notNull(underlying, "underlying");
     this.longShort          = longShort;
     this.swaptionSettlement = swaptionSettlement;
     this.expiry             = expiry;
     this.underlying         = underlying;
 }
예제 #6
0
 private Swaption(LongShort longShort, SwaptionSettlement swaptionSettlement, AdjustableDate expiryDate, LocalTime expiryTime, ZoneId expiryZone, Swap underlying)
 {
     JodaBeanUtils.notNull(longShort, "longShort");
     JodaBeanUtils.notNull(swaptionSettlement, "swaptionSettlement");
     JodaBeanUtils.notNull(expiryDate, "expiryDate");
     JodaBeanUtils.notNull(expiryTime, "expiryTime");
     JodaBeanUtils.notNull(expiryZone, "expiryZone");
     JodaBeanUtils.notNull(underlying, "underlying");
     this.longShort          = longShort;
     this.swaptionSettlement = swaptionSettlement;
     this.expiryDate         = expiryDate;
     this.expiryTime         = expiryTime;
     this.expiryZone         = expiryZone;
     this.underlying         = underlying;
     validate();
 }
예제 #7
0
 /// <summary>
 /// Sets settlement method.
 /// <para>
 /// The settlement of the option is specified by <seealso cref="SwaptionSettlement"/>.
 /// </para>
 /// </summary>
 /// <param name="swaptionSettlement">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder swaptionSettlement(SwaptionSettlement swaptionSettlement)
 {
     JodaBeanUtils.notNull(swaptionSettlement, "swaptionSettlement");
     this.swaptionSettlement_Renamed = swaptionSettlement;
     return(this);
 }