Class RatePaymentPeriod.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<RatePaymentPeriod>
-
- com.opengamma.strata.product.swap.RatePaymentPeriod.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<RatePaymentPeriod>
- Enclosing class:
- RatePaymentPeriod
public static final class RatePaymentPeriod.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<RatePaymentPeriod>
The bean-builder forRatePaymentPeriod
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RatePaymentPeriod.Builder
accrualPeriods(RateAccrualPeriod... accrualPeriods)
Sets theaccrualPeriods
property in the builder from an array of objects.RatePaymentPeriod.Builder
accrualPeriods(List<RateAccrualPeriod> accrualPeriods)
Sets the accrual periods that combine to form the payment period.RatePaymentPeriod
build()
RatePaymentPeriod.Builder
compoundingMethod(CompoundingMethod compoundingMethod)
Sets the compounding method to use when there is more than one accrual period, default is 'None'.RatePaymentPeriod.Builder
currency(Currency currency)
Sets the primary currency of the payment period.RatePaymentPeriod.Builder
dayCount(DayCount dayCount)
Sets the day count convention.RatePaymentPeriod.Builder
fxReset(FxReset fxReset)
Sets the FX reset definition, optional.Object
get(String propertyName)
RatePaymentPeriod.Builder
notional(double notional)
Sets the notional amount, positive if receiving, negative if paying.RatePaymentPeriod.Builder
paymentDate(LocalDate paymentDate)
Sets the date that payment occurs.RatePaymentPeriod.Builder
set(String propertyName, Object newValue)
RatePaymentPeriod.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<RatePaymentPeriod>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<RatePaymentPeriod>
-
set
public RatePaymentPeriod.Builder set(String propertyName, Object newValue)
-
set
public RatePaymentPeriod.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<RatePaymentPeriod>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<RatePaymentPeriod>
-
build
public RatePaymentPeriod build()
-
paymentDate
public RatePaymentPeriod.Builder paymentDate(LocalDate paymentDate)
Sets the date that payment occurs.The date that payment is made for the accrual periods. If the schedule adjusts for business days, then this is the adjusted date.
- Parameters:
paymentDate
- the new value, not null- Returns:
- this, for chaining, not null
-
accrualPeriods
public RatePaymentPeriod.Builder accrualPeriods(List<RateAccrualPeriod> accrualPeriods)
Sets the accrual periods that combine to form the payment period.Each accrual period includes the applicable dates and details of how to observe the rate. In most cases, there will be one accrual period. If there is more than one accrual period then compounding may apply.
- Parameters:
accrualPeriods
- the new value, not empty- Returns:
- this, for chaining, not null
-
accrualPeriods
public RatePaymentPeriod.Builder accrualPeriods(RateAccrualPeriod... accrualPeriods)
Sets theaccrualPeriods
property in the builder from an array of objects.- Parameters:
accrualPeriods
- the new value, not empty- Returns:
- this, for chaining, not null
-
dayCount
public RatePaymentPeriod.Builder dayCount(DayCount dayCount)
Sets the day count convention.Each accrual period contains a year fraction calculated using this day count. This day count is used when there is a need to perform further calculations.
- Parameters:
dayCount
- the new value, not null- Returns:
- this, for chaining, not null
-
currency
public RatePaymentPeriod.Builder currency(Currency currency)
Sets the primary currency of the payment period.This is the currency of the swap leg and the currency that interest calculation is made in.
The amounts of the notional are usually expressed in terms of this currency, however they can be converted from amounts in a different currency. See the optional
fxReset
property.- Parameters:
currency
- the new value, not null- Returns:
- this, for chaining, not null
-
fxReset
public RatePaymentPeriod.Builder fxReset(FxReset fxReset)
Sets the FX reset definition, optional.This property is used when the defined amount of the notional is specified in a currency other than the currency of the swap leg. When this occurs, the notional amount has to be converted using an FX rate to the swap leg currency.
The FX reset definition must be valid. It must have a reference currency that is different to that of this period, and the currency of this period must be one of those defined by the FX reset index.
- Parameters:
fxReset
- the new value- Returns:
- this, for chaining, not null
-
notional
public RatePaymentPeriod.Builder notional(double notional)
Sets the notional amount, positive if receiving, negative if paying.The notional amount applicable during the period. The currency of the notional is specified by
currency
unless there is thefxReset
property is present.- Parameters:
notional
- the new value- Returns:
- this, for chaining, not null
-
compoundingMethod
public RatePaymentPeriod.Builder compoundingMethod(CompoundingMethod compoundingMethod)
Sets the compounding method to use when there is more than one accrual period, default is 'None'.Compounding is used when combining accrual periods.
- Parameters:
compoundingMethod
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<RatePaymentPeriod>
-
-