|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TimeFrame
The definition of a period of time.
Each period, or frame, is defined by a day or days, a
start time and an end time.
Nested Class Summary | |
---|---|
static class |
TimeFrame.Day
Days of the week. |
Method Summary | |
---|---|
void |
addFrame(int startTime,
int endTime,
TimeFrame.Day... days)
Adds a period to this TimeFrame. |
Method Detail |
---|
void addFrame(int startTime, int endTime, TimeFrame.Day... days) throws java.lang.IllegalArgumentException
For example, to add to a TimeFrame the period on Sundays between 1AM and 4PM:
addFrame (1, 16, Day.SUNDAY);
To add to a TimeFrame the period on Sundays, Mondays, Tuesdays between 2PM and 4PM:
addFrame (14, 16, Day.SUNDAY, Day.MONDAY, Day.TUESDAY);
startTime
- a short integer between 0 and 24.endTime
- a short integer between 0 and 24.days
- a day or a comma-separated list of days.
java.lang.IllegalArgumentException
- if the start time is later than the end time or the days are invalid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |