Class CapitalIndexedBondPaymentPeriod.Builder
- java.lang.Object
-
- org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondPaymentPeriod>
-
- com.opengamma.strata.product.bond.CapitalIndexedBondPaymentPeriod.Builder
-
- All Implemented Interfaces:
org.joda.beans.BeanBuilder<CapitalIndexedBondPaymentPeriod>
- Enclosing class:
- CapitalIndexedBondPaymentPeriod
public static final class CapitalIndexedBondPaymentPeriod.Builder extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondPaymentPeriod>
The bean-builder forCapitalIndexedBondPaymentPeriod
.
-
-
Method Summary
-
-
-
Method Detail
-
get
public Object get(String propertyName)
- Specified by:
get
in interfaceorg.joda.beans.BeanBuilder<CapitalIndexedBondPaymentPeriod>
- Overrides:
get
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondPaymentPeriod>
-
set
public CapitalIndexedBondPaymentPeriod.Builder set(String propertyName, Object newValue)
-
set
public CapitalIndexedBondPaymentPeriod.Builder set(org.joda.beans.MetaProperty<?> property, Object value)
- Specified by:
set
in interfaceorg.joda.beans.BeanBuilder<CapitalIndexedBondPaymentPeriod>
- Overrides:
set
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondPaymentPeriod>
-
build
public CapitalIndexedBondPaymentPeriod build()
-
currency
public CapitalIndexedBondPaymentPeriod.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 CapitalIndexedBondPaymentPeriod.Builder notional(double notional)
Sets the notional amount, must be non-zero.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
-
realCoupon
public CapitalIndexedBondPaymentPeriod.Builder realCoupon(double realCoupon)
Sets the rate of real coupon.The real coupon is the rate before taking the inflation into account. For example, a real coupon of c for semi-annual payments is c/2.
- Parameters:
realCoupon
- the new value- Returns:
- this, for chaining, not null
-
startDate
public CapitalIndexedBondPaymentPeriod.Builder startDate(LocalDate startDate)
Sets the start date of the payment period.This is the first 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 CapitalIndexedBondPaymentPeriod.Builder endDate(LocalDate endDate)
Sets the end date of the payment period.This is the last 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 CapitalIndexedBondPaymentPeriod.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 CapitalIndexedBondPaymentPeriod.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
-
detachmentDate
public CapitalIndexedBondPaymentPeriod.Builder detachmentDate(LocalDate detachmentDate)
Sets the detachment date.Some bonds trade ex-coupon before the coupon payment. The coupon is paid not to the owner of the bond on the payment date but to the owner of the bond on the detachment date.
When building, this will default to the end date if not specified.
- Parameters:
detachmentDate
- the new value, not null- Returns:
- this, for chaining, not null
-
rateComputation
public CapitalIndexedBondPaymentPeriod.Builder rateComputation(RateComputation rateComputation)
Sets the rate to be computed.The value of the period is based on this rate. This must be an inflation rate observation, specifically
InflationEndInterpolatedRateComputation
orInflationEndMonthRateComputation
.- Parameters:
rateComputation
- the new value, not null- Returns:
- this, for chaining, not null
-
toString
public String toString()
- Overrides:
toString
in classorg.joda.beans.impl.direct.DirectFieldsBeanBuilder<CapitalIndexedBondPaymentPeriod>
-
-