|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ftlabs.fisa.calc.CouponDateGenerator
public final class CouponDateGenerator
A class to efficiently calculate the next or previous coupon payment date, or quasi coupon payment date.
| Constructor Summary | |
|---|---|
CouponDateGenerator(int interestFrequency,
boolean eomAdjust)
Create a new CouponDateGenerator using the provided interestFrequency and eomAdjust setting. |
|
| Method Summary | |
|---|---|
FISADate |
current()
Returns a new FISADate to represent the current coupon date or
quasi coupon date. |
void |
current(FISADate date)
Sets the provided date to the current coupon date or quasi coupon date. |
int |
currentAsInteger()
Returns the current coupon date or quasi coupon date as an integer, formatted as ( year * 10000 ) + ( month * 100 ) + day. |
protected byte |
getLDOM()
Get the last day of the month. |
protected static byte |
getLDOM(int year,
int month)
Get the last day of the month. |
static FISADate |
getNext(FISADate settlementDate,
FISADate synchronizeDate,
int interestFrequency,
boolean eomAdjust)
|
static void |
getNext(FISADate settlementDate,
FISADate synchronizeDate,
int interestFrequency,
boolean eomAdjust,
FISADate nextCouponDate)
|
static FISADate |
getNext(FISADate currentCouponDate,
int interestFrequency,
boolean eomAdjust)
|
static void |
getNext(FISADate currentCouponDate,
int interestFrequency,
boolean eomAdjust,
FISADate nextCouponDate)
|
static FISADate |
getNext(FISADate currentCouponDate,
int periodCount,
int interestFrequency,
boolean eomAdjust)
|
static void |
getNext(FISADate currentCouponDate,
int periodCount,
int interestFrequency,
boolean eomAdjust,
FISADate nextCouponDate)
|
static FISADate |
getPrev(FISADate currentCouponDate,
int interestFrequency,
boolean eomAdjust)
|
static void |
getPrev(FISADate currentCouponDate,
int interestFrequency,
boolean eomAdjust,
FISADate prevCouponDate)
|
static FISADate |
getPrev(FISADate currentCouponDate,
int periodCount,
int interestFrequency,
boolean eomAdjust)
|
static void |
getPrev(FISADate currentCouponDate,
int periodCount,
int interestFrequency,
boolean eomAdjust,
FISADate prevCouponDate)
|
void |
moveNext()
Move to the next coupon date or quasi coupon date. |
void |
moveNext(int periodCount)
Move forward a number of periods as specified by periodCount. |
void |
movePrev()
Move to the previous coupon date or quasi coupon date. |
void |
movePrev(int periodCount)
Move backward a number of periods as specified by periodCount. |
FISADate |
next()
Moves to the next coupon date or quasi coupon date and returns a new FISADate to represent that date. |
void |
next(FISADate date)
Moves to the next coupon date or quasi coupon date and sets the provided date to that date. |
FISADate |
next(int periodCount)
Move forward a number of periods as specified by periodCount and return the ending period date. |
void |
next(int periodCount,
FISADate date)
Move forward a number of periods as specified by periodCount and set the provided date to represent the ending period date. |
FISADate |
prev()
Moves to the previous coupon date or quasi coupon date and returns a new FISADate to represent that date. |
void |
prev(FISADate date)
Moves to the previous coupon date or quasi coupon date and sets the provided date to that date. |
FISADate |
prev(int periodCount)
Move backward a number of periods as specified by periodCount and return the ending period date. |
void |
prev(int periodCount,
FISADate date)
Move backward a number of periods as specified by periodCount and set the provided date to represent the ending period date. |
void |
setCurrent(FISADate date)
Sets the current coupon date or quasi coupon date. |
void |
setToSettlementPeriod(FISADate settlementDate,
FISADate lastInterestDate)
Sets the current coupon date or quasi coupon date to be the next coupon date after the provided settlement date. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CouponDateGenerator(int interestFrequency,
boolean eomAdjust)
interestFrequency - The number of interest payments within a year.eomAdjust - Determines whether to use the End Of Month Adjustment
rule or not.| Method Detail |
|---|
public void moveNext(int periodCount)
periodCount - The number of periods to move forward.
public void next(int periodCount,
FISADate date)
periodCount - The number of periods to move forward.date - A date to store the ending coupon period date.public FISADate next(int periodCount)
periodCount - The number of periods to move forward.
public final void moveNext()
public final FISADate next()
FISADate to represent that date.
public final void next(FISADate date)
date - A FISADate that will be set to the next coupon date
or quasi coupon date.public void movePrev(int periodCount)
periodCount - The number of periods to move backward.
public void prev(int periodCount,
FISADate date)
periodCount - The number of periods to move backward.date - A date to store the ending coupon period date.public FISADate prev(int periodCount)
periodCount - The number of periods to move backward.
public final void movePrev()
public final FISADate prev()
FISADate to represent that date.
public final void prev(FISADate date)
date - A FISADate that will be set to the previous coupon date
or quasi coupon date.public final FISADate current()
FISADate to represent the current coupon date or
quasi coupon date.
public final void current(FISADate date)
date - A FISADate that will be set to the current coupon date
or quasi coupon date.public final int currentAsInteger()
FISADates without allocating any new
objects.
public final void setCurrent(FISADate date)
date - The current coupon date or quasi coupon date.
public final void setToSettlementPeriod(FISADate settlementDate,
FISADate lastInterestDate)
settlementDate - The settlement date.lastInterestDate - The interest date just prior to redemption for
odd last periods, or the redemption date for normal length periods.protected final byte getLDOM()
protected static final byte getLDOM(int year,
int month)
public static final FISADate getNext(FISADate currentCouponDate,
int interestFrequency,
boolean eomAdjust)
public static final void getNext(FISADate currentCouponDate,
int interestFrequency,
boolean eomAdjust,
FISADate nextCouponDate)
public static final FISADate getNext(FISADate currentCouponDate,
int periodCount,
int interestFrequency,
boolean eomAdjust)
public static final void getNext(FISADate currentCouponDate,
int periodCount,
int interestFrequency,
boolean eomAdjust,
FISADate nextCouponDate)
public static final FISADate getPrev(FISADate currentCouponDate,
int interestFrequency,
boolean eomAdjust)
public static final void getPrev(FISADate currentCouponDate,
int interestFrequency,
boolean eomAdjust,
FISADate prevCouponDate)
public static final FISADate getPrev(FISADate currentCouponDate,
int periodCount,
int interestFrequency,
boolean eomAdjust)
public static final void getPrev(FISADate currentCouponDate,
int periodCount,
int interestFrequency,
boolean eomAdjust,
FISADate prevCouponDate)
public static final FISADate getNext(FISADate settlementDate,
FISADate synchronizeDate,
int interestFrequency,
boolean eomAdjust)
public static final void getNext(FISADate settlementDate,
FISADate synchronizeDate,
int interestFrequency,
boolean eomAdjust,
FISADate nextCouponDate)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||