public interface Recurrence
| example | getUnit() |
getStep() |
getWeekdays() |
getWeekOfMonth() |
|---|---|---|---|---|
| Every day | DateUnit.DAY |
1 | WeekdaySet.ALL |
* |
| Every 3 days | DateUnit.DAY |
3 | WeekdaySet.ALL |
* |
| Every working day (Mo-Fr) | DateUnit.DAY |
1 | WeekdaySet.WORKDAYS |
* |
| Every 2 weeks | DateUnit.WEEK |
2 | WeekdaySet.ALL |
* |
| Every month on fixed day | DateUnit.MONTH |
1 | WeekdaySet.ALL |
null |
| Every month on the first Monday | DateUnit.MONTH |
1 | {Weekday.MONDAY} |
WeekOfMonth.FIRST |
| Every month on the last working day (Mo-Fr) | DateUnit.MONTH |
1 | WeekdaySet.WORKDAYS |
WeekOfMonth.LAST |
| Every year on fixed day | DateUnit.YEAR |
1 | WeekdaySet.ALL |
null |
| Every two years on the second Wednesday of a fixed month | DateUnit.YEAR |
2 | {Weekday.WEDNESDAY} |
WeekOfMonth.SECOND |
| Modifier and Type | Method and Description |
|---|---|
int |
getStep()
This method gets the step of this
Recurrence. |
DateUnit |
getUnit()
This method gets the
DateUnit of this Recurrence. |
WeekdaySet |
getWeekdays()
This method gets the
WeekdaySet containing the Weekdays of the recurrence. |
WeekOfMonth |
getWeekOfMonth()
|
DateUnit getUnit()
DateUnit of this Recurrence.int getStep()
Recurrence. The Recurrence will happen every step units (e.g. every day or every 2 weeks). The returned value has to be greater or equal to
1.WeekdaySet getWeekdays()
WeekdaySet containing the Weekdays of the recurrence.
This is used as a filter to match only for particular Weekdays. The default is
WeekdaySet.ALL. This method is ignored for weekly Recurrence as it would NOT
make any sense. unit is daily recurrences that do not
match will be omitted, while otherwise the closest
match will be used. If it is monthly or yearly it will recurre on the
first match of the weekdays according to the value of getWeekOfMonth().WeekdaySet or null.WeekOfMonth getWeekOfMonth()
WeekOfMonth of a monthly or yearly
recurrence. By default (if this method returns null and getWeekdays() returns
WeekdaySet.ALL) such recurrence always takes place on a fixed day of the month based on the initial
occurrence. However, to specify a monthly or yearly Recurrence
taking place on a specific day of the week this method can return a value identifying the
week within the month (e.g. "on first Friday every month", or "on last weekday every month"). This
method is ignored if this is NOT a monthly or yearly Recurrence.WeekOfMonth or null.Copyright © 2001–2016 mmm-Team. All rights reserved.