org.chronicj.impl
Class RangeEachDayTE

java.lang.Object
  |
  +--org.chronicj.impl.AbstractTemporalExpression
        |
        +--org.chronicj.impl.RangeEachDayTE
All Implemented Interfaces:
TemporalExpression

public class RangeEachDayTE
extends AbstractTemporalExpression

Implements support for temporal expressions that describe a recurring span of time each day or across multiple days. In pseudocode, this looks like: "starting at 11:34am and ending at 3:50pm" or "From 11pm to 2am". Expression syntax is specified using constructors.

This class is based directly on patterns described in a paper by Martin Fowler which can be found here.

Author:
Matthew Lipper
See Also:
Recurring Events for Calendars by Martin Fowler

Constructor Summary
RangeEachDayTE(int startHour, int startMinute, int endHour, int endMinute)
          Creates a new RangeEachDayTE object.
 
Method Summary
 boolean includes(org.chronicj.TimePoint aTimePoint)
          Used to check whether a given date is occurs within the current range expressed by this TemporalExpression.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RangeEachDayTE

public RangeEachDayTE(int startHour,
                      int startMinute,
                      int endHour,
                      int endMinute)
Creates a new RangeEachDayTE object. If startHour less than or equal to the endHour, then end hour is assumed to belong to the next day. As such, this class can match a maximim range of 24 hours.

Parameters:
startHour - int 0 to 23
startMinute - int 0 to 59
endHour - int 0 to 23
endMinute - int 0 to 59
Method Detail

includes

public boolean includes(org.chronicj.TimePoint aTimePoint)
Description copied from interface: TemporalExpression
Used to check whether a given date is occurs within the current range expressed by this TemporalExpression.

Specified by:
includes in interface TemporalExpression
Specified by:
includes in class AbstractTemporalExpression
Parameters:
aTimePoint - the TimePoint to be checked for inclusion in the current set
Returns:
true or false, indicating whether the supplied TimePoint occurs within the current range

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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