|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Date
com.ftlabs.fisa.FISADate
public final class FISADate
An extension of java.util.Date that contains added properties and methods for day count calculation optimization. This compromise allows for compatibility with standard comparison, manipulation and formatting operations, as well as allowing optimized access to the individual elements of this date.
| Constructor Summary | |
|---|---|
FISADate(int year,
int month,
int day)
Allocates a FISADate object and initializes it to
the specified year, month and day. |
|
FISADate(long date)
Allocates a FISADate object and initializes it to
represent the specified number of milliseconds since the
standard base time known as "the epoch", namely January 1,
1970, 00:00:00 GMT. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.util.Date date)
Compares a Date to this FISADate. |
int |
getAsInteger()
Returns an integer representing this date, formated as yyyymmdd. |
int |
getBaseOffset()
Calculates the number of days since the base date 00/00/0000. |
int |
getBaseOffsetNoLeap()
|
int |
getDate()
Deprecated. Use java.util.GregorianCalendar. |
int |
getDay()
Returns the day of this date. |
int |
getHours()
Deprecated. Use java.util.GregorianCalendar. |
int |
getMinutes()
Deprecated. Use java.util.GregorianCalendar. |
int |
getMonth()
Returns the month of this date. |
int |
getSeconds()
Deprecated. Use java.util.GregorianCalendar. |
long |
getTime()
Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this FISADate object. |
int |
getYear()
Returns the year of this date. |
boolean |
isEom()
|
boolean |
isInSync(FISADate date,
InterestFrequency interestFrequency,
boolean eomAdjust)
A method to test whether this date is in sync with the provided date according to the provided interestFrequency and eomAdjust setting. |
void |
set(int year,
int month,
int day)
Sets this FISADate to the specified year, month and day. |
void |
setDate(int value)
Deprecated. Use FISADate.set( int year, int month, int day ). |
void |
setDay(int value)
Deprecated. Use FISADate.set( int year, int month, int day ). |
void |
setHours(int value)
Deprecated. This should not be used. |
void |
setMinutes(int value)
Deprecated. This should not be used. |
void |
setMonth(int value)
Deprecated. Use FISADate.set( int year, int month, int day ). |
void |
setSeconds(int value)
Deprecated. This should not be used. |
void |
setTime(long time)
Sets this FISADate object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT. |
void |
setYear(int value)
Deprecated. Use FISADate.set( int year, int month, int day ). |
java.lang.String |
toString()
|
| Methods inherited from class java.util.Date |
|---|
after, before, clone, equals, getTimezoneOffset, hashCode, parse, toGMTString, toLocaleString, UTC |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FISADate(long date)
FISADate object and initializes it to
represent the specified number of milliseconds since the
standard base time known as "the epoch", namely January 1,
1970, 00:00:00 GMT.
date - the milliseconds since January 1, 1970, 00:00:00 GMT.
public FISADate(int year,
int month,
int day)
FISADate object and initializes it to
the specified year, month and day.
year - the year of this date.month - the month of this date.day - the day of this date.| Method Detail |
|---|
public void setTime(long time)
setTime in class java.util.Datetime - milliseconds after January 1, 1970 00:00:00 GMT.public long getTime()
getTime in class java.util.Date
public void set(int year,
int month,
int day)
year - the year of this date.month - the month of this date.day - the day of this date.public final int getBaseOffset()
public final int getBaseOffsetNoLeap()
public final int compareTo(java.util.Date date)
Date to this FISADate.
compareTo in interface java.lang.Comparable<java.util.Date>compareTo in class java.util.Datedate - Date to compare to this FISADate.
FISADate is less than
date, an integer greater than 0 if this FISADate is greater than
date, or 0 if this FISADate equals date.public final int getAsInteger()
public final int getYear()
java.util.Date,
it is not for FISADate. FISADate maintains a short
that holds the year for this date. The year can therefore be obtained much more quickly
than using a java.util.GregorianCalendar. This method is used in various
day count methods.
getYear in class java.util.Datepublic final int getMonth()
java.util.Calendar,
this month begins with 1 and ends with 12. Although this is deprecated
in java.util.Date, it is not for FISADate.
FISADate maintains a byte that holds the month
for this date. The month can therefore be obtained much more quickly than
using a java.util.GregorianCalendar. This method is used in
various day count methods.
getMonth in class java.util.Datepublic final int getDay()
java.util.Date,
it is not for FISADate. FISADate maintains a byte
that holds the day for this date. The day can therefore be obtained much more quickly than
using a java.util.GregorianCalendar. This method is used in various day
count methods.
getDay in class java.util.Date
public final boolean isInSync(FISADate date,
InterestFrequency interestFrequency,
boolean eomAdjust)
date - A date.interestFrequency - The InterestFrequency to use.eomAdjust - Determines whether the end of month adjustment rule should be used.
public void setYear(int value)
FISADate.set( int year, int month, int day ).
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
setYear in class java.util.Datevalue - the year of this date.public void setMonth(int value)
FISADate.set( int year, int month, int day ).
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
setMonth in class java.util.Datevalue - the month of this date.public void setDate(int value)
FISADate.set( int year, int month, int day ).
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
setDate in class java.util.Datevalue - the date of this date.public void setDay(int value)
FISADate.set( int year, int month, int day ).
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
value - the day of this date.public void setHours(int value)
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
FISADate does not support a time portion.
setHours in class java.util.Datevalue - the hours.public void setMinutes(int value)
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
FISADate does not support a time portion.
setMinutes in class java.util.Datevalue - the minutes.public void setSeconds(int value)
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
FISADate does not support a time portion.
setSeconds in class java.util.Datevalue - the seconds.public int getDate()
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
getDate in class java.util.Datepublic int getHours()
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
FISADate does not support a time portion.
getHours in class java.util.Datepublic int getMinutes()
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
FISADate does not support a time portion.
getMinutes in class java.util.Datepublic int getSeconds()
java.lang.IllegalArgumentException().
This method is deprecated in java.util.Date.
FISADate does not support a time portion.
getSeconds in class java.util.Datepublic boolean isEom()
public java.lang.String toString()
toString in class java.util.Date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||