Class CreditCouponPaymentPeriod.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CreditCouponPaymentPeriod>
-
- com.opengamma.strata.product.credit.CreditCouponPaymentPeriod.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<CreditCouponPaymentPeriod>
- Enclosing class:
- CreditCouponPaymentPeriod
public static final class CreditCouponPaymentPeriod.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CreditCouponPaymentPeriod>
The bean-builder forCreditCouponPaymentPeriod
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreditCouponPaymentPeriod
build()
CreditCouponPaymentPeriod.Builder
currency(Currency currency)
Sets the primary currency of the payment period.CreditCouponPaymentPeriod.Builder
effectiveEndDate(LocalDate effectiveEndDate)
Sets the effective protection end date of the period.CreditCouponPaymentPeriod.Builder
effectiveStartDate(LocalDate effectiveStartDate)
Sets the effective protection start date of the period.CreditCouponPaymentPeriod.Builder
endDate(LocalDate endDate)
Sets the end date of the accrual period.CreditCouponPaymentPeriod.Builder
fixedRate(double fixedRate)
Sets the fixed coupon rate.Object
get(String propertyName)
CreditCouponPaymentPeriod.Builder
notional(double notional)
Sets the notional amount, must be positive.CreditCouponPaymentPeriod.Builder
paymentDate(LocalDate paymentDate)
Sets the payment date.CreditCouponPaymentPeriod.Builder
set(String propertyName, Object newValue)
CreditCouponPaymentPeriod.Builder
set(org.joda.beans.MetaProperty<?> property, Object value)
CreditCouponPaymentPeriod.Builder
startDate(LocalDate startDate)
Sets the start date of the accrual period.String
toString()
CreditCouponPaymentPeriod.Builder
unadjustedEndDate(LocalDate unadjustedEndDate)
Sets the unadjusted end date.CreditCouponPaymentPeriod.Builder
unadjustedStartDate(LocalDate unadjustedStartDate)
Sets the unadjusted start date.CreditCouponPaymentPeriod.Builder
yearFraction(double yearFraction)
Sets the year fraction that the accrual period represents.
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<CreditCouponPaymentPeriod>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CreditCouponPaymentPeriod>
-
set
public CreditCouponPaymentPeriod.Builder set(String propertyName, Object newValue)
-
set
public CreditCouponPaymentPeriod.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<CreditCouponPaymentPeriod>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CreditCouponPaymentPeriod>
-
build
public CreditCouponPaymentPeriod build()
-
currency
public CreditCouponPaymentPeriod.Builder currency(Currency currency)
Sets the primary currency of the payment period.The amounts of the notional are usually expressed in terms of this currency, however they can be converted from amounts in a different currency.
- Parameters:
currency
- the new value, not null- Returns:
- this, for chaining, not null
-
notional
public CreditCouponPaymentPeriod.Builder notional(double notional)
Sets the notional amount, must be positive.The notional amount applicable during the period. The currency of the notional is specified by
currency
.- Parameters:
notional
- the new value- Returns:
- this, for chaining, not null
-
startDate
public CreditCouponPaymentPeriod.Builder startDate(LocalDate startDate)
Sets the start date of the accrual period.This is the first accrual date in the period. If the schedule adjusts for business days, then this is the adjusted date.
- Parameters:
startDate
- the new value, not null- Returns:
- this, for chaining, not null
-
endDate
public CreditCouponPaymentPeriod.Builder endDate(LocalDate endDate)
Sets the end date of the accrual period.This is the last accrual date in the period. If the schedule adjusts for business days, then this is the adjusted date.
- Parameters:
endDate
- the new value, not null- Returns:
- this, for chaining, not null
-
unadjustedStartDate
public CreditCouponPaymentPeriod.Builder unadjustedStartDate(LocalDate unadjustedStartDate)
Sets the unadjusted start date.The start date before any business day adjustment is applied.
When building, this will default to the start date if not specified.
- Parameters:
unadjustedStartDate
- the new value, not null- Returns:
- this, for chaining, not null
-
unadjustedEndDate
public CreditCouponPaymentPeriod.Builder unadjustedEndDate(LocalDate unadjustedEndDate)
Sets the unadjusted end date.The end date before any business day adjustment is applied.
When building, this will default to the end date if not specified.
- Parameters:
unadjustedEndDate
- the new value, not null- Returns:
- this, for chaining, not null
-
effectiveStartDate
public CreditCouponPaymentPeriod.Builder effectiveStartDate(LocalDate effectiveStartDate)
Sets the effective protection start date of the period.This is the first date in the protection period associated with the payment period.
- Parameters:
effectiveStartDate
- the new value, not null- Returns:
- this, for chaining, not null
-
effectiveEndDate
public CreditCouponPaymentPeriod.Builder effectiveEndDate(LocalDate effectiveEndDate)
Sets the effective protection end date of the period.This is the last date in the protection period associated with the payment period.
- Parameters:
effectiveEndDate
- the new value, not null- Returns:
- this, for chaining, not null
-
paymentDate
public CreditCouponPaymentPeriod.Builder paymentDate(LocalDate paymentDate)
Sets the payment date.The fixed rate is paid on this date. This is not necessarily the same as
endDate
.- Parameters:
paymentDate
- the new value, not null- Returns:
- this, for chaining, not null
-
fixedRate
public CreditCouponPaymentPeriod.Builder fixedRate(double fixedRate)
Sets the fixed coupon rate.The single payment is based on this fixed coupon rate. The coupon must be represented in fraction.
- Parameters:
fixedRate
- the new value- Returns:
- this, for chaining, not null
-
yearFraction
public CreditCouponPaymentPeriod.Builder yearFraction(double yearFraction)
Sets the year fraction that the accrual period represents.The year fraction of a period is based on
startDate
andendDate
. The value is usually calculated using a specificDayCount
.- Parameters:
yearFraction
- the new value- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CreditCouponPaymentPeriod>
-
-