/// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(ResolvedCds beanToCopy)
 {
     this.buySell_Renamed              = beanToCopy.BuySell;
     this.legalEntityId_Renamed        = beanToCopy.LegalEntityId;
     this.paymentPeriods_Renamed       = beanToCopy.PaymentPeriods;
     this.protectionEndDate_Renamed    = beanToCopy.ProtectionEndDate;
     this.dayCount_Renamed             = beanToCopy.DayCount;
     this.paymentOnDefault_Renamed     = beanToCopy.PaymentOnDefault;
     this.protectionStart_Renamed      = beanToCopy.ProtectionStart;
     this.stepinDateOffset_Renamed     = beanToCopy.StepinDateOffset;
     this.settlementDateOffset_Renamed = beanToCopy.SettlementDateOffset;
 }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") @Override public Builder set(String propertyName, Object newValue)
            public override Builder set(string propertyName, object newValue)
            {
                switch (propertyName.GetHashCode())
                {
                case 244977400:         // buySell
                    this.buySell_Renamed = (BuySell)newValue;
                    break;

                case 866287159:         // legalEntityId
                    this.legalEntityId_Renamed = (StandardId)newValue;
                    break;

                case -1674414612:         // paymentPeriods
                    this.paymentPeriods_Renamed = (IList <CreditCouponPaymentPeriod>)newValue;
                    break;

                case -1193325040:         // protectionEndDate
                    this.protectionEndDate_Renamed = (LocalDate)newValue;
                    break;

                case 1905311443:         // dayCount
                    this.dayCount_Renamed = (DayCount)newValue;
                    break;

                case -480203780:         // paymentOnDefault
                    this.paymentOnDefault_Renamed = (PaymentOnDefault)newValue;
                    break;

                case 2103482633:         // protectionStart
                    this.protectionStart_Renamed = (ProtectionStartOfDay)newValue;
                    break;

                case 852621746:         // stepinDateOffset
                    this.stepinDateOffset_Renamed = (DaysAdjustment)newValue;
                    break;

                case 135924714:         // settlementDateOffset
                    this.settlementDateOffset_Renamed = (DaysAdjustment)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
 private ResolvedCds(BuySell buySell, StandardId legalEntityId, IList <CreditCouponPaymentPeriod> paymentPeriods, LocalDate protectionEndDate, DayCount dayCount, PaymentOnDefault paymentOnDefault, ProtectionStartOfDay protectionStart, DaysAdjustment stepinDateOffset, DaysAdjustment settlementDateOffset)
 {
     JodaBeanUtils.notNull(buySell, "buySell");
     JodaBeanUtils.notNull(legalEntityId, "legalEntityId");
     JodaBeanUtils.notEmpty(paymentPeriods, "paymentPeriods");
     JodaBeanUtils.notNull(protectionEndDate, "protectionEndDate");
     JodaBeanUtils.notNull(dayCount, "dayCount");
     JodaBeanUtils.notNull(paymentOnDefault, "paymentOnDefault");
     JodaBeanUtils.notNull(protectionStart, "protectionStart");
     JodaBeanUtils.notNull(stepinDateOffset, "stepinDateOffset");
     JodaBeanUtils.notNull(settlementDateOffset, "settlementDateOffset");
     this.buySell              = buySell;
     this.legalEntityId        = legalEntityId;
     this.paymentPeriods       = ImmutableList.copyOf(paymentPeriods);
     this.protectionEndDate    = protectionEndDate;
     this.dayCount             = dayCount;
     this.paymentOnDefault     = paymentOnDefault;
     this.protectionStart      = protectionStart;
     this.stepinDateOffset     = stepinDateOffset;
     this.settlementDateOffset = settlementDateOffset;
 }
Exemple #4
0
 public virtual void test_of_lookup_null()
 {
     assertThrows(() => PaymentOnDefault.of(null), typeof(System.ArgumentException));
 }
Exemple #5
0
 public virtual void test_of_lookup_notFound()
 {
     assertThrows(() => PaymentOnDefault.of("Rubbish"), typeof(System.ArgumentException));
 }
Exemple #6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_of_lookup(PaymentOnDefault convention, String name)
        public virtual void test_of_lookup(PaymentOnDefault convention, string name)
        {
            assertEquals(PaymentOnDefault.of(name), convention);
        }
Exemple #7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(dataProvider = "name") public void test_toString(PaymentOnDefault convention, String name)
        public virtual void test_toString(PaymentOnDefault convention, string name)
        {
            assertEquals(convention.ToString(), name);
        }
 /// <summary>
 /// Sets the payment on default.
 /// <para>
 /// Whether the accrued premium is paid in the event of a default.
 /// </para>
 /// </summary>
 /// <param name="paymentOnDefault">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder paymentOnDefault(PaymentOnDefault paymentOnDefault)
 {
     JodaBeanUtils.notNull(paymentOnDefault, "paymentOnDefault");
     this.paymentOnDefault_Renamed = paymentOnDefault;
     return(this);
 }