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 Weekday s 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()
Recurrence
DateUnit
of this Recurrence
.getUnit
in interface Recurrence
DateUnit
.Recurrence.getStep()
public int getStep()
Recurrence
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
.getStep
in interface Recurrence
public void setStep(int step)
step
- is the step
to set.public WeekdaySet getWeekdays()
Recurrence
WeekdaySet
containing the Weekday
s of the recurrence.
This is used as a filter to match only for particular Weekday
s. 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 Recurrence
WeekdaySet
or null
.public void setWeekdays(WeekdaySet weekdays)
weekdays
- are the weekdays
to set.public WeekOfMonth getWeekOfMonth()
Recurrence
WeekOfMonth
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 Recurrence
WeekOfMonth
or null
.public void setWeekOfMonth(WeekOfMonth weekOfMonth)
weekOfMonth
- is the weekOfMonth
to set.Copyright © 2001–2016 mmm-Team. All rights reserved.