public final class KnownAmountBondPaymentPeriod extends Object implements BondPaymentPeriod, org.joda.beans.ImmutableBean, Serializable
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
KnownAmountBondPaymentPeriod.Builder
The bean-builder for
KnownAmountBondPaymentPeriod. |
static class |
KnownAmountBondPaymentPeriod.Meta
The meta-bean for
KnownAmountBondPaymentPeriod. |
| Modifier and Type | Method and Description |
|---|---|
KnownAmountBondPaymentPeriod |
adjustPaymentDate(TemporalAdjuster adjuster)
Adjusts the payment date using the rules of the specified adjuster.
|
static KnownAmountBondPaymentPeriod.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
void |
collectIndices(ImmutableSet.Builder<Index> builder)
Collects all the indices referred to by this period.
|
boolean |
equals(Object obj) |
Currency |
getCurrency()
Gets the currency of the payment resulting from the period.
|
LocalDate |
getEndDate()
Gets the end date of the payment period.
|
Payment |
getPayment()
Gets the payment.
|
LocalDate |
getPaymentDate()
Gets the date that the payment is made.
|
LocalDate |
getStartDate()
Gets the start date of the payment period.
|
LocalDate |
getUnadjustedEndDate()
Gets the unadjusted end date.
|
LocalDate |
getUnadjustedStartDate()
Gets the unadjusted start date.
|
int |
hashCode() |
static KnownAmountBondPaymentPeriod.Meta |
meta()
The meta-bean for
KnownAmountBondPaymentPeriod. |
KnownAmountBondPaymentPeriod.Meta |
metaBean() |
static KnownAmountBondPaymentPeriod |
of(Payment payment,
SchedulePeriod period)
Obtains an instance based on a payment and schedule period.
|
KnownAmountBondPaymentPeriod.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public static KnownAmountBondPaymentPeriod of(Payment payment, SchedulePeriod period)
payment - the paymentperiod - the schedule periodpublic LocalDate getPaymentDate()
BondPaymentPeriodEach payment period has a single payment date. This date has been adjusted to be a valid business day.
getPaymentDate in interface BondPaymentPeriodpublic Currency getCurrency()
BondPaymentPeriodThis is the currency of the generated payment. A period has a single currency.
getCurrency in interface BondPaymentPeriodpublic KnownAmountBondPaymentPeriod adjustPaymentDate(TemporalAdjuster adjuster)
BondPaymentPeriod
The adjuster is typically an instance of BusinessDayAdjustment.
Implementations must return a new instance unless they are immutable and no change occurs.
adjustPaymentDate in interface BondPaymentPeriodadjuster - the adjuster to apply to the payment datepublic void collectIndices(ImmutableSet.Builder<Index> builder)
BondPaymentPeriodA 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.
collectIndices in interface BondPaymentPeriodbuilder - the builder to usepublic static KnownAmountBondPaymentPeriod.Meta meta()
KnownAmountBondPaymentPeriod.public static KnownAmountBondPaymentPeriod.Builder builder()
public KnownAmountBondPaymentPeriod.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic Payment getPayment()
This includes the payment date and amount. If the schedule adjusts for business days, then the date is the adjusted date.
public LocalDate getStartDate()
This is the first date in the period. If the schedule adjusts for business days, then this is the adjusted date.
getStartDate in interface BondPaymentPeriodpublic LocalDate getEndDate()
This is the last date in the period. If the schedule adjusts for business days, then this is the adjusted date.
getEndDate in interface BondPaymentPeriodpublic LocalDate getUnadjustedStartDate()
The start date before any business day adjustment is applied.
When building, this will default to the start date if not specified.
public LocalDate getUnadjustedEndDate()
The end date before any business day adjustment is applied.
When building, this will default to the end date if not specified.
public KnownAmountBondPaymentPeriod.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.