/// <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;
 }
Esempio n. 4
0
 public virtual void test_of_lookup_null()
 {
     assertThrows(() => ProtectionStartOfDay.of(null), typeof(System.ArgumentException));
 }
Esempio n. 5
0
 public virtual void test_of_lookup_notFound()
 {
     assertThrows(() => ProtectionStartOfDay.of("Rubbish"), typeof(System.ArgumentException));
 }
Esempio n. 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(ProtectionStartOfDay convention, String name)
        public virtual void test_of_lookup(ProtectionStartOfDay convention, string name)
        {
            assertEquals(ProtectionStartOfDay.of(name), convention);
        }
Esempio n. 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(ProtectionStartOfDay convention, String name)
        public virtual void test_toString(ProtectionStartOfDay convention, string name)
        {
            assertEquals(convention.ToString(), name);
        }
 /// <summary>
 /// Sets the protection start of the day.
 /// <para>
 /// When the protection starts on the start date.
 /// </para>
 /// </summary>
 /// <param name="protectionStart">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder protectionStart(ProtectionStartOfDay protectionStart)
 {
     JodaBeanUtils.notNull(protectionStart, "protectionStart");
     this.protectionStart_Renamed = protectionStart;
     return(this);
 }