Ejemplo n.º 1
0
 /// <summary>
 /// Restricted copy constructor. </summary>
 /// <param name="beanToCopy">  the bean to copy from, not null </param>
 internal Builder(RatePaymentPeriod beanToCopy)
 {
     this.paymentDate_Renamed       = beanToCopy.PaymentDate;
     this.accrualPeriods_Renamed    = beanToCopy.AccrualPeriods;
     this.dayCount_Renamed          = beanToCopy.DayCount;
     this.currency_Renamed          = beanToCopy.Currency;
     this.fxReset_Renamed           = beanToCopy.fxReset;
     this.notional_Renamed          = beanToCopy.Notional;
     this.compoundingMethod_Renamed = beanToCopy.CompoundingMethod;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an instance. </summary>
 /// <param name="paymentDate">  the value of the property, not null </param>
 /// <param name="accrualPeriods">  the value of the property, not empty </param>
 /// <param name="dayCount">  the value of the property, not null </param>
 /// <param name="currency">  the value of the property, not null </param>
 /// <param name="fxReset">  the value of the property </param>
 /// <param name="notional">  the value of the property </param>
 /// <param name="compoundingMethod">  the value of the property, not null </param>
 internal RatePaymentPeriod(LocalDate paymentDate, IList <RateAccrualPeriod> accrualPeriods, DayCount dayCount, Currency currency, FxReset fxReset, double notional, CompoundingMethod compoundingMethod)
 {
     JodaBeanUtils.notNull(paymentDate, "paymentDate");
     JodaBeanUtils.notEmpty(accrualPeriods, "accrualPeriods");
     JodaBeanUtils.notNull(dayCount, "dayCount");
     JodaBeanUtils.notNull(currency, "currency");
     JodaBeanUtils.notNull(compoundingMethod, "compoundingMethod");
     this.paymentDate       = paymentDate;
     this.accrualPeriods    = ImmutableList.copyOf(accrualPeriods);
     this.dayCount          = dayCount;
     this.currency          = currency;
     this.fxReset           = fxReset;
     this.notional          = notional;
     this.compoundingMethod = compoundingMethod;
     validate();
 }
Ejemplo n.º 3
0
//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 -1540873516:         // paymentDate
                    this.paymentDate_Renamed = (LocalDate)newValue;
                    break;

                case -92208605:         // accrualPeriods
                    this.accrualPeriods_Renamed = (IList <RateAccrualPeriod>)newValue;
                    break;

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

                case 575402001:         // currency
                    this.currency_Renamed = (Currency)newValue;
                    break;

                case -449555555:         // fxReset
                    this.fxReset_Renamed = (FxReset)newValue;
                    break;

                case 1585636160:         // notional
                    this.notional_Renamed = (double?)newValue.Value;
                    break;

                case -1376171496:         // compoundingMethod
                    this.compoundingMethod_Renamed = (CompoundingMethod)newValue;
                    break;

                default:
                    throw new NoSuchElementException("Unknown property: " + propertyName);
                }
                return(this);
            }
Ejemplo n.º 4
0
 /// <summary>
 /// Sets the compounding method to use when there is more than one accrual period, default is 'None'.
 /// <para>
 /// Compounding is used when combining accrual periods.
 /// </para>
 /// </summary>
 /// <param name="compoundingMethod">  the new value, not null </param>
 /// <returns> this, for chaining, not null </returns>
 public Builder compoundingMethod(CompoundingMethod compoundingMethod)
 {
     JodaBeanUtils.notNull(compoundingMethod, "compoundingMethod");
     this.compoundingMethod_Renamed = compoundingMethod;
     return(this);
 }
 public virtual void test_of_lookup_null()
 {
     assertThrows(() => CompoundingMethod.of(null), typeof(System.ArgumentException));
 }
 public virtual void test_of_lookup_notFound()
 {
     assertThrows(() => CompoundingMethod.of("Rubbish"), typeof(System.ArgumentException));
 }
//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(CompoundingMethod convention, String name)
        public virtual void test_of_lookup(CompoundingMethod convention, string name)
        {
            assertEquals(CompoundingMethod.of(name), convention);
        }
//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(CompoundingMethod convention, String name)
        public virtual void test_toString(CompoundingMethod convention, string name)
        {
            assertEquals(convention.ToString(), name);
        }