|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.chronicj.impl.AbstractTemporalExpression
|
+--org.chronicj.impl.DayInMonthTE
Implements support for temporal expressions of the form: "last Friday of the
month" or "first Tuesday of the month". Expressions syntax is specified in
the constructor call (DayInMonthTE(int, int)).
This class is based directly on patterns described in a paper by Martin Fowler which can be found here.
| Constructor Summary | |
DayInMonthTE(int dayIndex)
Creates a temporal expression using day of the week 1 to 7. |
|
DayInMonthTE(int dayIndex,
int count)
Creates a temporal expression using day of the week 1 to 7 and day of week in month which may be either positive or negative indicating whether count is from beginning or end of the month, respectively. |
|
| Method Summary | |
boolean |
includes(org.chronicj.TimePoint aTimePoint)
Does the value of the supplied argument match this expression? If this instance was created with DayInMonthTE(int, int)
constructor: true = day of week matches and week of month matches, e.g. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DayInMonthTE(int dayIndex,
int count)
GregorianCalendar):
TemporalExpression anExpression = new DayInMonthTE(3,2); //example 1
TemporalExpression anotherExpression = new DayInMonthTE(6,-1);
//example 2
dayIndex - the day of the week numbered from 1 to 7count - the week number from the beginning of the month if positive
or the the week number from the end of the month if negative.public DayInMonthTE(int dayIndex)
TemporalExpression sunday = new DayInMonthTE(1); //Sunday
TemporalExpression saturday = new DayInMonthTE(7);
//SaturdayTemporalExpression thursday = new DayInMonthTE(5);
//Thursday
dayIndex - the day of the week numbered from 1 to 7| Method Detail |
public boolean includes(org.chronicj.TimePoint aTimePoint)
DayInMonthTE(int, int)
constructor: DayInMonthTE(int) constructor:
includes in interface TemporalExpressionincludes in class AbstractTemporalExpressionaTimePoint - the TimePoint against which to check
TemporalExpression
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||