public class RecurrenceBean extends Object implements Recurrence
Recurrence as simple Java Bean.| Modifier and Type | Field and Description |
|---|---|
private int |
step |
private DateUnit |
unit |
private WeekdaySet |
weekdays |
private WeekOfMonth |
weekOfMonth |
| Constructor and Description |
|---|
RecurrenceBean()
The constructor.
|
RecurrenceBean(DateUnit unit,
int step,
WeekdaySet weekdays,
WeekOfMonth weekOfMonth)
The constructor.
|
| 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()
|
void |
setStep(int step) |
void |
setUnit(DateUnit unit) |
void |
setWeekdays(WeekdaySet weekdays) |
void |
setWeekOfMonth(WeekOfMonth weekOfMonth) |
private DateUnit unit
private int step
private WeekdaySet weekdays
private WeekOfMonth weekOfMonth
public RecurrenceBean()
public RecurrenceBean(DateUnit unit, int step, WeekdaySet weekdays, WeekOfMonth weekOfMonth)
unit - - see getUnit().step - - see getStep().weekdays - - see getWeekdays().weekOfMonth - - see getWeekOfMonth().public DateUnit getUnit()
RecurrenceDateUnit of this Recurrence.getUnit in interface RecurrenceDateUnit.Recurrence.getStep()public int getStep()
RecurrenceRecurrence. 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.getStep in interface Recurrencepublic void setStep(int step)
step - is the step to set.public WeekdaySet getWeekdays()
RecurrenceWeekdaySet 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 Recurrence.getWeekOfMonth().getWeekdays in interface RecurrenceWeekdaySet or null.public void setWeekdays(WeekdaySet weekdays)
weekdays - are the weekdays to set.public WeekOfMonth getWeekOfMonth()
RecurrenceWeekOfMonth of a monthly or yearly
recurrence. By default (if this method returns null and Recurrence.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.getWeekOfMonth in interface RecurrenceWeekOfMonth or null.public void setWeekOfMonth(WeekOfMonth weekOfMonth)
weekOfMonth - is the weekOfMonth to set.Copyright © 2001–2016 mmm-Team. All rights reserved.