E
- a representation of a date, typically JDK: Date, Calendar;
Joda:LocalDate, YearMonthDaypublic interface KitCalculatorsFactory<E extends Serializable>
Modifier and Type | Method and Description |
---|---|
CurrencyDateCalculator<E> |
buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder) |
CurrencyCalculatorConfig |
getCurrencyCalculatorConfig() |
DateCalculator<E> |
getDateCalculator(String name,
String holidayHandlerType)
Create a new DateCalculator for a given name and type of handling.
|
CurrencyDateCalculator<E> |
getDefaultCurrencyDateCalculator(String ccy1,
String ccy2,
SpotLag spotLag)
Create a new IMMUTABLE CurrencyDateCalculator specialised for 2 currencies, including WorkingWeek, calendars
registered and CurrencyCalculatorConfig.
|
CurrencyDateCalculatorBuilder<E> |
getDefaultCurrencyDateCalculatorBuilder(String ccy1,
String ccy2,
SpotLag spotLag)
Create a new CurrencyDateCalculatorBuilder specialised for 2 currencies, including WorkingWeek, calendars registered and CurrencyCalculatorConfig.
|
HolidayCalendar<E> |
getHolidayCalendar(String calendarName) |
HolidayHandler<E> |
getHolidayHandler(String holidayHandlerType)
Create a new holiday handler of given type
|
IMMDateCalculator<E> |
getIMMDateCalculator()
Create a new IMMDateCalculator.
|
PeriodCountCalculator<E> |
getPeriodCountCalculator()
Create a new PeriodCountCalculator.
|
Set<String> |
getRegisteredHolidayCalendarNames() |
boolean |
isHolidayCalendarRegistered(String calendarName) |
KitCalculatorsFactory<E> |
registerHolidays(String calendarName,
HolidayCalendar<E> holidaysCalendar)
Use this method to register a holidays calendar.
|
void |
setCurrencyCalculatorConfig(CurrencyCalculatorConfig config)
Use this method register a specific currency config, if not provided then the DefaultCurrencyCalculatorConfig will be given.
|
KitCalculatorsFactory<E> |
unregisterAllHolidayCalendars()
unregister all holiday calendars;
|
KitCalculatorsFactory<E> |
unregisterHolidayCalendar(String calendarName)
Unregister a given holiday calendar
|
CurrencyDateCalculatorBuilder<E> getDefaultCurrencyDateCalculatorBuilder(String ccy1, String ccy2, SpotLag spotLag)
ccy1
- first currency, will pickup the holiday set for this ccy.ccy2
- second currency, will pick up the holiday set for this ccy.spotLag
- the number of days between tradeDate and spotDate.IllegalArgumentException
- if the type is not null or a valid value.CurrencyDateCalculator<E> buildCurrencyDateCalculator(CurrencyDateCalculatorBuilder<E> builder)
CurrencyDateCalculator<E> getDefaultCurrencyDateCalculator(String ccy1, String ccy2, SpotLag spotLag)
ccy1
- first currency, will pickup the holiday set for this ccy.ccy2
- second currency, will pick up the holiday set for this ccy.spotLag
- the number of days between tradeDate and spotDate.IllegalArgumentException
- if the type is not null or a valid value.void setCurrencyCalculatorConfig(CurrencyCalculatorConfig config)
config
- that specifies the set of currencies subject to USD T+1.CurrencyCalculatorConfig getCurrencyCalculatorConfig()
DateCalculator<E> getDateCalculator(String name, String holidayHandlerType)
name
- calendar name (holidays set interested in). If there is set of
holidays with that name, it will return a DateCalculator with
an empty holiday set (will work on Weekend only).holidayHandlerType
- typically one of the value of HolidayHandlerType or null.IllegalArgumentException
- if the type is not null or a valid value.KitCalculatorsFactory<E> registerHolidays(String calendarName, HolidayCalendar<E> holidaysCalendar)
calendarName
- the calendar name to register these holidays under.holidaysCalendar
- the holiday calendar (non-working days with boundaries).boolean isHolidayCalendarRegistered(String calendarName)
HolidayCalendar<E> getHolidayCalendar(String calendarName)
Set<String> getRegisteredHolidayCalendarNames()
KitCalculatorsFactory<E> unregisterHolidayCalendar(String calendarName)
calendarName
- the calendar name to unregister.KitCalculatorsFactory<E> unregisterAllHolidayCalendars()
PeriodCountCalculator<E> getPeriodCountCalculator()
IMMDateCalculator<E> getIMMDateCalculator()
HolidayHandler<E> getHolidayHandler(String holidayHandlerType)
holidayHandlerType
- IllegalArgumentException
- if the holidayHandlerType is unsupportedCopyright © 2006–2022 Appendium - Portfolio Financing Platform. All rights reserved.