Class KnownAmountBondPaymentPeriod
- java.lang.Object
-
- com.opengamma.strata.product.bond.KnownAmountBondPaymentPeriod
-
- All Implemented Interfaces:
BondPaymentPeriod,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class KnownAmountBondPaymentPeriod extends Object implements BondPaymentPeriod, org.joda.beans.ImmutableBean, Serializable
A period within a swap that results in a known amount.A swap leg consists of one or more periods that result in a payment. The standard class,
RatePaymentPeriod, represents a payment period calculated from a fixed or floating rate. By contrast, this class represents a period where the amount of the payment is known and fixed.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKnownAmountBondPaymentPeriod.BuilderThe bean-builder forKnownAmountBondPaymentPeriod.static classKnownAmountBondPaymentPeriod.MetaThe meta-bean forKnownAmountBondPaymentPeriod.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description KnownAmountBondPaymentPeriodadjustPaymentDate(TemporalAdjuster adjuster)Adjusts the payment date using the rules of the specified adjuster.static KnownAmountBondPaymentPeriod.Builderbuilder()Returns a builder used to create an instance of the bean.voidcollectIndices(ImmutableSet.Builder<Index> builder)Collects all the indices referred to by this period.booleanequals(Object obj)CurrencygetCurrency()Gets the currency of the payment resulting from the period.LocalDategetEndDate()Gets the end date of the payment period.PaymentgetPayment()Gets the payment.LocalDategetPaymentDate()Gets the date that the payment is made.LocalDategetStartDate()Gets the start date of the payment period.LocalDategetUnadjustedEndDate()Gets the unadjusted end date.LocalDategetUnadjustedStartDate()Gets the unadjusted start date.inthashCode()static KnownAmountBondPaymentPeriod.Metameta()The meta-bean forKnownAmountBondPaymentPeriod.KnownAmountBondPaymentPeriod.MetametaBean()static KnownAmountBondPaymentPeriodof(Payment payment, SchedulePeriod period)Obtains an instance based on a payment and schedule period.KnownAmountBondPaymentPeriod.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()
-
-
-
Method Detail
-
of
public static KnownAmountBondPaymentPeriod of(Payment payment, SchedulePeriod period)
Obtains an instance based on a payment and schedule period.- Parameters:
payment- the paymentperiod- the schedule period- Returns:
- the period
-
getPaymentDate
public LocalDate getPaymentDate()
Description copied from interface:BondPaymentPeriodGets the date that the payment is made.Each payment period has a single payment date. This date has been adjusted to be a valid business day.
- Specified by:
getPaymentDatein interfaceBondPaymentPeriod- Returns:
- the payment date of the period
-
getCurrency
public Currency getCurrency()
Description copied from interface:BondPaymentPeriodGets the currency of the payment resulting from the period.This is the currency of the generated payment. A period has a single currency.
- Specified by:
getCurrencyin interfaceBondPaymentPeriod- Returns:
- the currency of the period
-
adjustPaymentDate
public KnownAmountBondPaymentPeriod adjustPaymentDate(TemporalAdjuster adjuster)
Description copied from interface:BondPaymentPeriodAdjusts the payment date using the rules of the specified adjuster.The adjuster is typically an instance of
BusinessDayAdjustment. Implementations must return a new instance unless they are immutable and no change occurs.- Specified by:
adjustPaymentDatein interfaceBondPaymentPeriod- Parameters:
adjuster- the adjuster to apply to the payment date- Returns:
- the adjusted payment event
-
collectIndices
public void collectIndices(ImmutableSet.Builder<Index> builder)
Description copied from interface:BondPaymentPeriodCollects all the indices referred to by this period.A period will typically refer to at least one index, such as 'GBP-LIBOR-3M'. Each index that is referred to must be added to the specified builder.
- Specified by:
collectIndicesin interfaceBondPaymentPeriod- Parameters:
builder- the builder to use
-
meta
public static KnownAmountBondPaymentPeriod.Meta meta()
The meta-bean forKnownAmountBondPaymentPeriod.- Returns:
- the meta-bean, not null
-
builder
public static KnownAmountBondPaymentPeriod.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public KnownAmountBondPaymentPeriod.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getPayment
public Payment getPayment()
Gets the payment.This includes the payment date and amount. If the schedule adjusts for business days, then the date is the adjusted date.
- Returns:
- the value of the property, not null
-
getStartDate
public LocalDate getStartDate()
Gets 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.
- Specified by:
getStartDatein interfaceBondPaymentPeriod- Returns:
- the value of the property, not null
-
getEndDate
public LocalDate getEndDate()
Gets 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.
- Specified by:
getEndDatein interfaceBondPaymentPeriod- Returns:
- the value of the property, not null
-
getUnadjustedStartDate
public LocalDate getUnadjustedStartDate()
Gets 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.
- Returns:
- the value of the property, not null
-
getUnadjustedEndDate
public LocalDate getUnadjustedEndDate()
Gets 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.
- Returns:
- the value of the property, not null
-
toBuilder
public KnownAmountBondPaymentPeriod.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-