org.chronicj.impl
Class DefaultSchedule

java.lang.Object
  |
  +--org.chronicj.impl.DefaultSchedule
All Implemented Interfaces:
Schedule

public class DefaultSchedule
extends java.lang.Object
implements Schedule

Default implementation of a Schedule.

Author:
Matthew Lipper
See Also:
Recurring Events for Calendars

Constructor Summary
DefaultSchedule()
          Creates an instance of a DefaultSchedule.
 
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)
          All calculations are made using DatePrecision#DATE precision.
 boolean isOccuring(org.chronicj.Event anEvent, org.chronicj.DateRange aDateRange)
          Default implementation of org.chronicj.Schedule#isOccuring(org.chronicj.Event,org.chronicj.DateRangeImpl).
 boolean isOccuring(org.chronicj.Event anEvent, org.chronicj.TimePoint aTimePoint)
          Default implementation of Schedule.isOccuring(org.chronicj.Event,org.chronicj.TimePoint).
 boolean isScheduled(org.chronicj.Event anEvent)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSchedule

public DefaultSchedule()
Creates an instance of a DefaultSchedule.

Method Detail

isOccuring

public boolean isOccuring(org.chronicj.Event anEvent,
                          org.chronicj.DateRange aDateRange)
Default implementation of org.chronicj.Schedule#isOccuring(org.chronicj.Event,org.chronicj.DateRangeImpl).

Specified by:
isOccuring in interface Schedule
Parameters:
anEvent - the Event whose schedule is being queried
aDateRange - the time period in which to check schedule information
Returns:
a boolean value indicating whether the event occurs within the specified DateRange
Throws:
java.lang.NullPointerException - if either argument is null
java.lang.IllegalArgumentException - if the DateRange argument is empty
See Also:
org.chronicj.Schedule#isOccuring(org.chronicj.Event,org.chronicj.DateRangeImpl)

isOccuring

public boolean isOccuring(org.chronicj.Event anEvent,
                          org.chronicj.TimePoint aTimePoint)
Default implementation of Schedule.isOccuring(org.chronicj.Event,org.chronicj.TimePoint).

Specified by:
isOccuring in interface Schedule
Parameters:
anEvent - the Event whose schedule is being queried
aTimePoint - the moment in time
Returns:
a boolean value indicating whether the event occurs during the specified TimePoint
Throws:
java.lang.NullPointerException - if either argument is null
See Also:
org.chronicj.Schedule#isOccuring(org.chronicj.Event,org.chronicj.DateRangeImpl)

isScheduled

public boolean isScheduled(org.chronicj.Event anEvent)

add

public void add(org.chronicj.Event anEvent,
                org.chronicj.TemporalExpression aTemporalExpression)
Description copied from interface: Schedule
Adds an Eventwhose occurance is determined by the given TemporalExpression.

Specified by:
add in interface Schedule
Parameters:
anEvent - the Event to add
aTemporalExpression - the date/time(s) when this Event occurs.

dates

public java.util.List dates(org.chronicj.Event anEvent,
                            org.chronicj.DateRange during)
All calculations are made using DatePrecision#DATE precision.

Specified by:
dates in interface Schedule
Parameters:
anEvent - the Event whose schedule is being queried
Returns:
a boolean value indicating whether the event occurs within the specified DateRange
See Also:
org.chronicj.Schedule#dates(org.chronicj.Event, org.chronicj.DateRangeImpl)

nextOccurence

public org.chronicj.TimePoint nextOccurence(org.chronicj.Event anEvent,
                                            org.chronicj.TimePoint aTimePoint)
Description copied from interface: Schedule
Returns a TimePointindicating the next occurence of the supplied Eventon or after the given point in time.

Specified by:
nextOccurence in interface Schedule
Parameters:
anEvent - the Event whose schedule is being queried
aTimePoint - point in time after which to check the Event's next occurrence.
Returns:
a boolean value indicating whether the event occurs within the specified DateRange


Copyright © 2003-2004 Digital Clash Software. All Rights Reserved.