public class Schedule extends Object implements ScheduleInterface
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 |
---|
Schedule(LocalDate referenceDate,
DayCountConventionInterface daycountconvention,
Period... periods) |
Schedule(LocalDate referenceDate,
List<Period> periods,
DayCountConventionInterface daycountconvention) |
Modifier and Type | Method and Description |
---|---|
DayCountConventionInterface |
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.
|
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, wait
forEach, spliterator
public Schedule(LocalDate referenceDate, DayCountConventionInterface daycountconvention, Period... periods)
public Schedule(LocalDate referenceDate, List<Period> periods, DayCountConventionInterface daycountconvention)
public LocalDate getReferenceDate()
ScheduleInterface
getReferenceDate
in interface ScheduleInterface
public List<Period> getPeriods()
ScheduleInterface
getPeriods
in interface ScheduleInterface
public DayCountConventionInterface getDaycountconvention()
ScheduleInterface
getDaycountconvention
in interface ScheduleInterface
public int getNumberOfPeriods()
ScheduleInterface
getNumberOfPeriods
in interface ScheduleInterface
public Period getPeriod(int periodIndex)
ScheduleInterface
getPeriod
in interface ScheduleInterface
periodIndex
- A given period index.public double getFixing(int periodIndex)
ScheduleInterface
getFixing
in interface ScheduleInterface
periodIndex
- A given period index.public double getPayment(int periodIndex)
ScheduleInterface
getPayment
in interface ScheduleInterface
periodIndex
- A given period index.public double getPeriodStart(int periodIndex)
ScheduleInterface
getPeriodStart
in interface ScheduleInterface
periodIndex
- A given period index.public double getPeriodEnd(int periodIndex)
ScheduleInterface
getPeriodEnd
in interface ScheduleInterface
periodIndex
- A given period index.public double getPeriodLength(int periodIndex)
ScheduleInterface
getPeriodLength
in interface ScheduleInterface
periodIndex
- A given period index.Copyright © 2015. All rights reserved.