|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Represents a coherent collection of logical events that are expected to
occur over the course of time. A Schedule is composed of zero
or more ScheduleElements which are
queried to handle requests for schedule information.
Schedule also provides the public API for adding, editing and removing scheduled events for a given entity.
This class is based directly on patterns described in a paper by Martin Fowler which can be found here.
| Method Summary | |
void |
add(org.chronicj.Event anEvent,
org.chronicj.TemporalExpression aTemporalExpression)
Adds an Eventwhose occurance is determined by the given
TemporalExpression. |
java.util.List |
dates(org.chronicj.Event anEvent,
org.chronicj.DateRange during)
Returns a Listof
TimePoints on which the supplied event
occurs given the specified DateRange. |
boolean |
isOccuring(org.chronicj.Event anEvent,
org.chronicj.DateRange aDateRange)
Determines if a given event occurs within a particular date range for this schedule. |
boolean |
isOccuring(org.chronicj.Event anEvent,
org.chronicj.TimePoint aTimePoint)
Determines if a given event occurs during a particular instant in time. |
org.chronicj.TimePoint |
nextOccurence(org.chronicj.Event anEvent,
org.chronicj.TimePoint aTimePoint)
Returns a TimePointindicating the next occurence of the
supplied Eventon or after the given point in time. |
| Method Detail |
public boolean isOccuring(org.chronicj.Event anEvent,
org.chronicj.TimePoint aTimePoint)
anEvent - the Event whose schedule is being queriedaTimePoint - the moment in time
public boolean isOccuring(org.chronicj.Event anEvent,
org.chronicj.DateRange aDateRange)
anEvent - the Event whose schedule is being queriedaDateRange - the time period in which to check schedule information
public java.util.List dates(org.chronicj.Event anEvent,
org.chronicj.DateRange during)
Listof
TimePoints on which the supplied event
occurs given the specified DateRange.
anEvent - the Event whose schedule is being queried
public org.chronicj.TimePoint nextOccurence(org.chronicj.Event anEvent,
org.chronicj.TimePoint aTimePoint)
TimePointindicating the next occurence of the
supplied Eventon or after the given point in time.
anEvent - the Event whose schedule is being queriedaTimePoint - point in time after which to check the Event's next
occurrence.
public void add(org.chronicj.Event anEvent,
org.chronicj.TemporalExpression aTemporalExpression)
Eventwhose occurance is determined by the given
TemporalExpression.
anEvent - the Event to addaTemporalExpression - the date/time(s) when this Event occurs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||