Class RateCalculationSwapLeg.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateCalculationSwapLeg>
-
- com.opengamma.strata.product.swap.RateCalculationSwapLeg.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<RateCalculationSwapLeg>
- Enclosing class:
- RateCalculationSwapLeg
public static final class RateCalculationSwapLeg.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateCalculationSwapLeg>
The bean-builder forRateCalculationSwapLeg
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RateCalculationSwapLeg.Builder
accrualSchedule(PeriodicSchedule accrualSchedule)
Sets the accrual schedule.RateCalculationSwapLeg
build()
RateCalculationSwapLeg.Builder
calculation(RateCalculation calculation)
Sets the interest rate accrual calculation.Object
get(String propertyName)
RateCalculationSwapLeg.Builder
notionalSchedule(NotionalSchedule notionalSchedule)
Sets the notional schedule.RateCalculationSwapLeg.Builder
paymentSchedule(PaymentSchedule paymentSchedule)
Sets the payment schedule.RateCalculationSwapLeg.Builder
payReceive(PayReceive payReceive)
Sets whether the leg is pay or receive.RateCalculationSwapLeg.Builder
set(String propertyName, Object newValue)
RateCalculationSwapLeg.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
String
toString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<RateCalculationSwapLeg>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateCalculationSwapLeg>
-
set
public RateCalculationSwapLeg.Builder set(String propertyName, Object newValue)
-
set
public RateCalculationSwapLeg.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<RateCalculationSwapLeg>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateCalculationSwapLeg>
-
build
public RateCalculationSwapLeg build()
-
payReceive
public RateCalculationSwapLeg.Builder payReceive(PayReceive payReceive)
Sets whether the leg is pay or receive.A value of 'Pay' implies that the resulting amount is paid to the counterparty. A value of 'Receive' implies that the resulting amount is received from the counterparty. Note that negative interest rates can result in a payment in the opposite direction to that implied by this indicator.
- Parameters:
payReceive
- the new value, not null- Returns:
- this, for chaining, not null
-
accrualSchedule
public RateCalculationSwapLeg.Builder accrualSchedule(PeriodicSchedule accrualSchedule)
Sets the accrual schedule.This is used to define the accrual periods. These are used directly or indirectly to determine other dates in the swap.
- Parameters:
accrualSchedule
- the new value, not null- Returns:
- this, for chaining, not null
-
paymentSchedule
public RateCalculationSwapLeg.Builder paymentSchedule(PaymentSchedule paymentSchedule)
Sets the payment schedule.This is used to define the payment periods, including any compounding. The payment period dates are based on the accrual schedule.
- Parameters:
paymentSchedule
- the new value, not null- Returns:
- this, for chaining, not null
-
notionalSchedule
public RateCalculationSwapLeg.Builder notionalSchedule(NotionalSchedule notionalSchedule)
Sets the notional schedule.The notional amount schedule, which can vary during the lifetime of the swap. In most cases, the notional amount is not exchanged, with only the net difference being exchanged. However, in certain cases, initial, final or intermediate amounts are exchanged.
- Parameters:
notionalSchedule
- the new value, not null- Returns:
- this, for chaining, not null
-
calculation
public RateCalculationSwapLeg.Builder calculation(RateCalculation calculation)
Sets the interest rate accrual calculation.Different kinds of swap leg are determined by the subclass used here. See
FixedRateCalculation
,IborRateCalculation
andOvernightRateCalculation
.- Parameters:
calculation
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateCalculationSwapLeg>
-
-