Interface DayCount.ScheduleInfo
-
- All Known Implementing Classes:
Schedule
- Enclosing interface:
- DayCount
public static interface DayCount.ScheduleInfo
Information about the schedule necessary to calculate the day count.Some
DayCount
implementations require additional information about the schedule. Implementations of this interface provide that information.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default LocalDate
getEndDate()
Gets the end date of the schedule.default Frequency
getFrequency()
Gets the periodic frequency of the schedule period.default LocalDate
getPeriodEndDate(LocalDate date)
Gets the end date of the schedule period.default LocalDate
getStartDate()
Gets the start date of the schedule.default boolean
isEndOfMonthConvention()
Checks if the end of month convention is in use.
-
-
-
Method Detail
-
getStartDate
default LocalDate getStartDate()
Gets the start date of the schedule.The first date in the schedule. If the schedule adjusts for business days, then this is the adjusted date.
This throws an exception by default.
- Returns:
- the schedule start date
- Throws:
UnsupportedOperationException
- if the date cannot be obtained
-
getEndDate
default LocalDate getEndDate()
Gets the end date of the schedule.The last date in the schedule. If the schedule adjusts for business days, then this is the adjusted date.
This throws an exception by default.
- Returns:
- the schedule end date
- Throws:
UnsupportedOperationException
- if the date cannot be obtained
-
getPeriodEndDate
default LocalDate getPeriodEndDate(LocalDate date)
Gets the end date of the schedule period.This is called when a day count requires the end date of the schedule period.
This throws an exception by default.
- Parameters:
date
- the date to find the period end date for- Returns:
- the period end date
- Throws:
UnsupportedOperationException
- if the date cannot be obtained
-
getFrequency
default Frequency getFrequency()
Gets the periodic frequency of the schedule period.This is called when a day count requires the periodic frequency of the schedule.
This throws an exception by default.
- Returns:
- the periodic frequency
- Throws:
UnsupportedOperationException
- if the frequency cannot be obtained
-
isEndOfMonthConvention
default boolean isEndOfMonthConvention()
Checks if the end of month convention is in use.This is called when a day count needs to know whether the end-of-month convention is in use.
This is true by default.
- Returns:
- true if the end of month convention is in use
-
-