|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objectnet.objectlab.kit.datecalc.common.AbstractIMMDateCalculator<E>
E - a representation of a date, typically JDK: Date, Calendar;
Joda:LocalDate, YearMonthDaypublic abstract class AbstractIMMDateCalculator<E>
Abstract implementation in order to encapsulate all the common functionality
between Jdk and Joda implementations. It is parametrized on
but basically Date and LocalDate are the only
viable values for it for now.
| Field Summary | |
|---|---|
protected static int |
DAYS_IN_WEEK
|
protected static int |
MONTH_IN_YEAR
|
protected static int |
MONTHS_IN_QUARTER
|
| Constructor Summary | |
|---|---|
AbstractIMMDateCalculator()
|
|
| Method Summary | |
|---|---|
List<E> |
getIMMDates(E start,
E end)
Returns a list of IMM dates between 2 dates, it will exclude the start date if it is an IMM date but would include the end date if it is an IMM (same as IMMPeriod.QUARTERLY). |
protected abstract E |
getNextIMMDate(boolean requestNextIMM,
E theStartDate,
IMMPeriod period)
|
E |
getNextIMMDate(E startDate)
Given a start date, it will return the next IMM Date, even if the start date is an IMM date (same as calling getNextIMMDate(IMMPeriod.QUARTERLY)). |
E |
getNextIMMDate(E startDate,
IMMPeriod period)
Given a start date, it will return the next IMM Date based on the IMMPeriod, even if the start date is an IMM date. |
E |
getPreviousIMMDate(E startDate)
Given a start date, it will return the previous IMM Date, even if the start date is an IMM date. |
E |
getPreviousIMMDate(E startDate,
IMMPeriod period)
Given a start date, it will return the previous IMM Date based on the IMMPeriod, even if the start date is an IMM date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.objectlab.kit.datecalc.common.IMMDateCalculator |
|---|
getIMMDates, isIMMDate |
| Field Detail |
|---|
protected static final int MONTHS_IN_QUARTER
protected static final int MONTH_IN_YEAR
protected static final int DAYS_IN_WEEK
| Constructor Detail |
|---|
public AbstractIMMDateCalculator()
| Method Detail |
|---|
public E getNextIMMDate(E startDate)
IMMDateCalculator
getNextIMMDate in interface IMMDateCalculator<E>startDate -
public E getNextIMMDate(E startDate,
IMMPeriod period)
IMMDateCalculator
getNextIMMDate in interface IMMDateCalculator<E>startDate - period - specify when the "next" IMM is, if quarterly then it is the
conventional algorithm.
public E getPreviousIMMDate(E startDate)
IMMDateCalculator
getPreviousIMMDate in interface IMMDateCalculator<E>startDate -
public E getPreviousIMMDate(E startDate,
IMMPeriod period)
IMMDateCalculator
getPreviousIMMDate in interface IMMDateCalculator<E>startDate - period - specify when the "previous" IMM is, if quarterly then it is
the conventional algorithm.
public List<E> getIMMDates(E start,
E end)
getIMMDates in interface IMMDateCalculator<E>start - start of the interval, excludedend - end of the interval, may be included.
protected abstract E getNextIMMDate(boolean requestNextIMM,
E theStartDate,
IMMPeriod period)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||