public class ScheduleFromPeriods extends Object implements Schedule, Serializable
Period
which contains LocalDate dates and
an alternative representation using doubles.
Within a schedule, the mapping from doubles to dates is one to one.| Constructor and Description |
|---|
ScheduleFromPeriods(LocalDate referenceDate,
DayCountConvention daycountconvention,
Period... periods) |
ScheduleFromPeriods(LocalDate referenceDate,
List<Period> periods,
DayCountConvention daycountconvention) |
| Modifier and Type | Method and Description |
|---|---|
DayCountConvention |
getDaycountconvention()
Returns the daycount convention used to calculate period lengths.
|
double |
getFixing(int periodIndex)
Return the fixing converted to the internal daycounting relative
to the schedules reference date.
|
int |
getNumberOfPeriods()
Returns the number of periods.
|
double |
getPayment(int periodIndex)
Return the payment date converted to the internal daycounting relative
to the schedules reference date.
|
Period |
getPeriod(int periodIndex)
Return the period for a given period index.
|
double |
getPeriodEnd(int periodIndex)
Return the period end date converted to the internal daycounting relative
to the schedules reference date.
|
int |
getPeriodIndex(double time)
Return the index of the period which contains the given time point.
|
int |
getPeriodIndex(LocalDate date)
Return the index of the period which contains the given date.
|
double |
getPeriodLength(int periodIndex)
Return the period length for a given period index.
|
List<Period> |
getPeriods()
Returns the array of periods.
|
double |
getPeriodStart(int periodIndex)
Return the period start date converted to the internal daycounting relative
to the schedules reference date.
|
LocalDate |
getReferenceDate()
Returns the reference data of this schedule.
|
Iterator<Period> |
iterator() |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic ScheduleFromPeriods(LocalDate referenceDate, DayCountConvention daycountconvention, Period... periods)
public ScheduleFromPeriods(LocalDate referenceDate, List<Period> periods, DayCountConvention daycountconvention)
public LocalDate getReferenceDate()
SchedulegetReferenceDate in interface Schedulepublic List<Period> getPeriods()
SchedulegetPeriods in interface Schedulepublic DayCountConvention getDaycountconvention()
SchedulegetDaycountconvention in interface Schedulepublic int getNumberOfPeriods()
SchedulegetNumberOfPeriods in interface Schedulepublic Period getPeriod(int periodIndex)
Schedulepublic double getFixing(int periodIndex)
Schedulepublic double getPayment(int periodIndex)
SchedulegetPayment in interface ScheduleperiodIndex - A given period index.public double getPeriodStart(int periodIndex)
SchedulegetPeriodStart in interface ScheduleperiodIndex - A given period index.public double getPeriodEnd(int periodIndex)
SchedulegetPeriodEnd in interface ScheduleperiodIndex - A given period index.public double getPeriodLength(int periodIndex)
SchedulegetPeriodLength in interface ScheduleperiodIndex - A given period index.public int getPeriodIndex(double time)
SchedulegetPeriodIndex in interface Scheduletime - A given time.public int getPeriodIndex(LocalDate date)
SchedulegetPeriodIndex in interface Scheduledate - A given date.Copyright © 2019. All rights reserved.