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.BuilderaccrualPeriods(RateAccrualPeriod... accrualPeriods)Sets theaccrualPeriodsproperty in the builder from an array of objects.RatePaymentPeriod.BuilderaccrualPeriods(List<RateAccrualPeriod> accrualPeriods)Sets the accrual periods that combine to form the payment period.RatePaymentPeriodbuild()RatePaymentPeriod.BuildercompoundingMethod(CompoundingMethod compoundingMethod)Sets the compounding method to use when there is more than one accrual period, default is 'None'.RatePaymentPeriod.Buildercurrency(Currency currency)Sets the primary currency of the payment period.RatePaymentPeriod.BuilderdayCount(DayCount dayCount)Sets the day count convention.RatePaymentPeriod.BuilderfxReset(FxReset fxReset)Sets the FX reset definition, optional.Objectget(String propertyName)RatePaymentPeriod.Buildernotional(double notional)Sets the notional amount, positive if receiving, negative if paying.RatePaymentPeriod.BuilderpaymentDate(LocalDate paymentDate)Sets the date that payment occurs.RatePaymentPeriod.Builderset(String propertyName, Object newValue)RatePaymentPeriod.Builderset(org.joda.beans.MetaProperty<?> property, Object value)StringtoString()
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
getin interfaceorg.joda.beans.BeanBuilder<RatePaymentPeriod>- Overrides:
getin 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:
setin interfaceorg.joda.beans.BeanBuilder<RatePaymentPeriod>- Overrides:
setin 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 theaccrualPeriodsproperty 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
fxResetproperty.- 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
currencyunless there is thefxResetproperty 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:
toStringin classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<RatePaymentPeriod>
-
-