/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(OvernightRateCalculation beanToCopy) { this.dayCount_Renamed = beanToCopy.DayCount; this.index_Renamed = beanToCopy.Index; this.accrualMethod_Renamed = beanToCopy.AccrualMethod; this.negativeRateMethod_Renamed = beanToCopy.NegativeRateMethod; this.rateCutOffDays_Renamed = beanToCopy.RateCutOffDays; this.gearing_Renamed = beanToCopy.gearing; this.spread_Renamed = beanToCopy.spread; }
private OvernightRateCalculation(DayCount dayCount, OvernightIndex index, OvernightAccrualMethod accrualMethod, NegativeRateMethod negativeRateMethod, int rateCutOffDays, ValueSchedule gearing, ValueSchedule spread) { JodaBeanUtils.notNull(dayCount, "dayCount"); JodaBeanUtils.notNull(index, "index"); JodaBeanUtils.notNull(accrualMethod, "accrualMethod"); JodaBeanUtils.notNull(negativeRateMethod, "negativeRateMethod"); ArgChecker.notNegative(rateCutOffDays, "rateCutOffDays"); this.dayCount = dayCount; this.index = index; this.accrualMethod = accrualMethod; this.negativeRateMethod = negativeRateMethod; this.rateCutOffDays = rateCutOffDays; this.gearing = gearing; this.spread = spread; }
public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case 1905311443: // dayCount this.dayCount_Renamed = (DayCount)newValue; break; case 100346066: // index this.index_Renamed = (OvernightIndex)newValue; break; case -1335729296: // accrualMethod this.accrualMethod_Renamed = (OvernightAccrualMethod)newValue; break; case 1969081334: // negativeRateMethod this.negativeRateMethod_Renamed = (NegativeRateMethod)newValue; break; case -92095804: // rateCutOffDays this.rateCutOffDays_Renamed = (int?)newValue.Value; break; case -91774989: // gearing this.gearing_Renamed = (ValueSchedule)newValue; break; case -895684237: // spread this.spread_Renamed = (ValueSchedule)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
/// <summary> /// Sets the method of accruing overnight interest, defaulted to 'Compounded'. /// <para> /// Two methods of accrual are supported - compounding and averaging. /// Averaging is primarily related to the 'USD-FED-FUND' index. /// </para> /// </summary> /// <param name="accrualMethod"> the new value, not null </param> /// <returns> this, for chaining, not null </returns> public Builder accrualMethod(OvernightAccrualMethod accrualMethod) { JodaBeanUtils.notNull(accrualMethod, "accrualMethod"); this.accrualMethod_Renamed = accrualMethod; return(this); }
public virtual void test_of_lookup_null() { assertThrows(() => OvernightAccrualMethod.of(null), typeof(System.ArgumentException)); }
public virtual void test_of_lookup_notFound() { assertThrows(() => OvernightAccrualMethod.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(OvernightAccrualMethod convention, String name) public virtual void test_of_lookup(OvernightAccrualMethod convention, string name) { assertEquals(OvernightAccrualMethod.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(OvernightAccrualMethod convention, String name) public virtual void test_toString(OvernightAccrualMethod convention, string name) { assertEquals(convention.ToString(), name); }