org.chronicj.impl
Class DefaultScheduleElement

java.lang.Object
  |
  +--org.chronicj.impl.DefaultScheduleElement
All Implemented Interfaces:
ScheduleElement

public class DefaultScheduleElement
extends java.lang.Object
implements ScheduleElement

Default implementation of a ScheduleElement that can be used to compose a Schedule.

Author:
Matthew Lipper
See Also:
ScheduleElement

Constructor Summary
DefaultScheduleElement(org.chronicj.Event anEvent, org.chronicj.TemporalExpression anExpression)
          Create a default ScheduleElement using the supplied Event and TemporalExpression.
 
Method Summary
 boolean isOccuring(org.chronicj.Event anEvent, org.chronicj.DateRange aDateRange)
          Default implementation of org.chronicj.ScheduleElement#isOccuring(org.chronicj.Event,org.chronicj.DateRangeImpl) that will return the logical AND of calling isOccuring(org.chronicj.Event,org.chronicj.TimePoint) for the start and end dates of the supplied DateRange.
 boolean isOccuring(org.chronicj.Event anEvent, org.chronicj.TimePoint aTimePoint)
          Default implementation of ScheduleElement.isOccuring(org.chronicj.Event,org.chronicj.TimePoint) that will return true if the supplied Event takes place during the supplied TimePoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultScheduleElement

public DefaultScheduleElement(org.chronicj.Event anEvent,
                              org.chronicj.TemporalExpression anExpression)
Create a default ScheduleElement using the supplied Event and TemporalExpression.

Parameters:
anEvent - the event to be scheduled
anExpression - the TemporalExpression that defines when the event occurs
Throws:
java.lang.NullPointerException - if either argument is null
Method Detail

isOccuring

public boolean isOccuring(org.chronicj.Event anEvent,
                          org.chronicj.TimePoint aTimePoint)
Default implementation of ScheduleElement.isOccuring(org.chronicj.Event,org.chronicj.TimePoint) that will return true if the supplied Event takes place during the supplied TimePoint.

Specified by:
isOccuring in interface ScheduleElement
Parameters:
anEvent - the Event whose schedule is being queried
aTimePoint - an instant in time
Returns:
a boolean value indicating whether the event is occuring at the specified TimePoint
Throws:
java.lang.NullPointerException - if either argument is null
See Also:
ScheduleElement.isOccuring(org.chronicj.Event,org.chronicj.TimePoint)

isOccuring

public boolean isOccuring(org.chronicj.Event anEvent,
                          org.chronicj.DateRange aDateRange)
Default implementation of org.chronicj.ScheduleElement#isOccuring(org.chronicj.Event,org.chronicj.DateRangeImpl) that will return the logical AND of calling isOccuring(org.chronicj.Event,org.chronicj.TimePoint) for the start and end dates of the supplied DateRange.

Specified by:
isOccuring in interface ScheduleElement
Parameters:
anEvent - the Event whose schedule is being queried
aDateRange - the time period in which to check
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.ScheduleElement#isOccuring(org.chronicj.Event, org.chronicj.DateRangeImpl)


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