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.BuilderaccrualSchedule(PeriodicSchedule accrualSchedule)Sets the accrual schedule.RateCalculationSwapLegbuild()RateCalculationSwapLeg.Buildercalculation(RateCalculation calculation)Sets the interest rate accrual calculation.Objectget(String propertyName)RateCalculationSwapLeg.BuildernotionalSchedule(NotionalSchedule notionalSchedule)Sets the notional schedule.RateCalculationSwapLeg.BuilderpaymentSchedule(PaymentSchedule paymentSchedule)Sets the payment schedule.RateCalculationSwapLeg.BuilderpayReceive(PayReceive payReceive)Sets whether the leg is pay or receive.RateCalculationSwapLeg.Builderset(String propertyName, Object newValue)RateCalculationSwapLeg.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<RateCalculationSwapLeg>- Overrides:
getin 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:
setin interfaceorg.joda.beans.BeanBuilder<RateCalculationSwapLeg>- Overrides:
setin 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,IborRateCalculationandOvernightRateCalculation.- Parameters:
calculation- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<RateCalculationSwapLeg>
-
-