Skip to content

Commit

Permalink
PROD-29409: use getters everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
milenorf committed Dec 18, 2023
1 parent 60dd566 commit 36e36db
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,10 @@ public RateCalculationSwapLeg toLeg(
.endDate(endDate)
.frequency(getAccrualFrequency())
.businessDayAdjustment(getAccrualBusinessDayAdjustment())
.startDateBusinessDayAdjustment(startDateBusinessDayAdjustment)
.endDateBusinessDayAdjustment(endDateBusinessDayAdjustment)
.startDateBusinessDayAdjustment(getStartDateBusinessDayAdjustment())
.endDateBusinessDayAdjustment(getEndDateBusinessDayAdjustment())
.stubConvention(getStubConvention())
.rollConvention(rollConvention)
.rollConvention(getRollConvention())
.build())
.paymentSchedule(PaymentSchedule.builder()
.paymentFrequency(getPaymentFrequency())
Expand All @@ -508,11 +508,11 @@ public RateCalculationSwapLeg toLeg(
.build())
.notionalSchedule(NotionalSchedule.builder()
.currency(getCurrency())
.finalExchange(notionalExchange)
.initialExchange(notionalExchange)
.finalExchange(isNotionalExchange())
.initialExchange(isNotionalExchange())
.amount(ValueSchedule.of(notional)).build())
.calculation(IborRateCalculation.builder()
.index(index)
.index(getIndex())
.dayCount(getDayCount())
.fixingRelativeTo(getFixingRelativeTo())
.fixingDateOffset(getFixingDateOffset())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import static com.opengamma.strata.basics.schedule.Frequency.P3M;
import static com.opengamma.strata.basics.schedule.Frequency.P6M;
import static com.opengamma.strata.basics.schedule.StubConvention.LONG_INITIAL;
import static com.opengamma.strata.basics.schedule.StubConvention.SMART_INITIAL;
import static com.opengamma.strata.collect.TestHelper.assertSerialization;
import static com.opengamma.strata.collect.TestHelper.coverBeanEquals;
import static com.opengamma.strata.collect.TestHelper.coverImmutableBean;
Expand Down Expand Up @@ -152,6 +153,10 @@ public void test_toLeg() {
.startDate(startDate)
.endDate(endDate)
.businessDayAdjustment(BDA_MOD_FOLLOW)
.startDateBusinessDayAdjustment(BDA_MOD_FOLLOW)
.endDateBusinessDayAdjustment(BDA_MOD_FOLLOW)
.rollConvention(RollConventions.EOM)
.stubConvention(SMART_INITIAL)
.build())
.paymentSchedule(PaymentSchedule.builder()
.paymentFrequency(P3M)
Expand All @@ -178,6 +183,10 @@ public void test_toLeg_withSpread() {
.startDate(startDate)
.endDate(endDate)
.businessDayAdjustment(BDA_MOD_FOLLOW)
.startDateBusinessDayAdjustment(BDA_MOD_FOLLOW)
.endDateBusinessDayAdjustment(BDA_MOD_FOLLOW)
.rollConvention(RollConventions.EOM)
.stubConvention(SMART_INITIAL)
.build())
.paymentSchedule(PaymentSchedule.builder()
.paymentFrequency(P3M)
Expand Down

0 comments on commit 36e36db

Please sign in to comment.