|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcomics.core.GregorianDayRoller
This class provides a DayRoller implementation, based on the GregorianCalendar by default. The defaults for the starting date are the current date and for the applicable days to be all days.
| Constructor Summary | |
GregorianDayRoller()
The default constructor creates a GregorianDayRoller using a GregorianCalendar for the Calendar implementation, the current date as the starting date and sets all days as applicable. |
|
GregorianDayRoller(java.util.Calendar aStartDate,
int[] aApplicableDays)
This constructor allows the caller to set the GregorianDayRoller up in full. |
|
GregorianDayRoller(java.util.Date aStartDate,
int[] aApplicableDays)
This constructor allows the caller to set the GregorianDayRoller up in full. |
|
| Method Summary | |
java.util.Calendar |
getCurrentDate()
This method returns the current date, or the first earlier applicable day. |
int |
getCurrentDayOfMonth()
This method returns the current day of month (1-31) |
int |
getCurrentMonth()
This method returns the current month (1-12) |
int |
getCurrentYear()
This method returns the current year (4-digit notation, eg. 2003) |
java.lang.String |
getFormattedCurrentDate(java.lang.String aFormatter)
This method returns the formatted current date, or the first earlier applicable day. |
java.util.Calendar |
getNextDay()
This method returns the current Calendar instance rolled forward by the necessary amount of days to match the nearest future applicable day. |
java.util.Calendar |
getPreviousDay()
This method returns the current Calendar instance rolled back by the necessary amount of days to match the nearest previous applicable day. |
void |
setApplicableDays(int[] aDays)
This method allows the caller to specify which days should be reported. |
void |
setStartDate(java.util.Calendar aStartDate)
This method allows the setting of a specific starting date via a specified Calendar. |
void |
setStartDate(java.util.Date aStartDate)
This method allows the setting of a specific starting date via a specified Date. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GregorianDayRoller()
public GregorianDayRoller(java.util.Calendar aStartDate,
int[] aApplicableDays)
aStartDate - Calendar with a Calendar implementation set at the desired start date.aApplicableDays - int[] with the applicable days; the elements of the array should
all be one of the day constants defined on the Calendar interface.
This parameter can be 'null' if all days are applicable.
public GregorianDayRoller(java.util.Date aStartDate,
int[] aApplicableDays)
aStartDate - Date with the desired start date. The Calendar used here by default will be the GregorianCalendar.aApplicableDays - int[] with the applicable days; the elements of the array should
all be one of the day constants defined on the Calendar interface.
This parameter can be 'null' if all days are applicable.| Method Detail |
public java.util.Calendar getNextDay()
getNextDay in interface DayRollerpublic java.util.Calendar getPreviousDay()
getPreviousDay in interface DayRollerpublic void setApplicableDays(int[] aDays)
setApplicableDays in interface DayRolleraDays - int[] with the integer codes for days as specified by the constants
in the Calendar interface. Can be 'null' if all days are applicable.public void setStartDate(java.util.Calendar aStartDate)
setStartDate in interface DayRolleraStartDate - Calendar with the desired start date.public void setStartDate(java.util.Date aStartDate)
setStartDate in interface DayRolleraStartDate - Calendar with the desired start date.public int getCurrentDayOfMonth()
getCurrentDayOfMonth in interface DayRollerpublic int getCurrentMonth()
getCurrentMonth in interface DayRollerpublic int getCurrentYear()
getCurrentYear in interface DayRollerpublic java.util.Calendar getCurrentDate()
getCurrentDate in interface DayRollerpublic java.lang.String getFormattedCurrentDate(java.lang.String aFormatter)
getFormattedCurrentDate in interface DayRoller
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||