public static class RecurrenceRule.WeekdayNum
extends java.lang.Object
Weekday in a specific range. It parses values like -4SU which means the fourth last Sunday
in the interval or 2MO which means the second Monday in the interval. In addition this class accepts simple weekdays like SU
which means every Sunday in the interval. These values are defined as:
weekdaynum = [[plus / minus] ordwk] weekday
plus = "+"
minus = "-"
ordwk = 1*2DIGIT ;1 to 53
weekday = "SU" / "MO" / "TU" / "WE" / "TH" / "FR" / "SA"
;Corresponding to SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY,
;FRIDAY, and SATURDAY days of the week.
| Modifier and Type | Field and Description |
|---|---|
int |
pos
The position of this weekday in the interval.
|
org.dmfs.rfc5545.Weekday |
weekday
The
Weekday. |
| Constructor and Description |
|---|
WeekdayNum(int pos,
org.dmfs.rfc5545.Weekday weekday)
Create a new WeekdayNum instance.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
toString() |
static RecurrenceRule.WeekdayNum |
valueOf(java.lang.String value)
Parse a weekdaynum String as defined in RFC 5545 (this definition equals the
definition in RFC 2445).
|
static RecurrenceRule.WeekdayNum |
valueOf(java.lang.String value,
boolean tolerant)
Parse a weekdaynum String as defined in RFC 5545 (this definition equals the
definition in RFC 2445).
|
public final int pos
0 if this instance means every occurrence of weekday in the
interval.public final org.dmfs.rfc5545.Weekday weekday
Weekday.public WeekdayNum(int pos,
org.dmfs.rfc5545.Weekday weekday)
TODO: update range check
pos - The position of the weekday in the Interval or 0 for every occurrence of the weekday.weekday - The Weekday.public static RecurrenceRule.WeekdayNum valueOf(java.lang.String value, boolean tolerant) throws InvalidRecurrenceRuleException
value - The weekdaynum String to parse.tolerant - Set to true to be tolerant and accept values outside of the allowed range.RecurrenceRule.WeekdayNum instance.InvalidRecurrenceRuleException - If the weekdaynum string is invalid.public static RecurrenceRule.WeekdayNum valueOf(java.lang.String value) throws InvalidRecurrenceRuleException
valueOf(String, boolean) this method is always strict and throws on every invalid value.value - The weekdaynum String to parse.RecurrenceRule.WeekdayNum instance.InvalidRecurrenceRuleException - If the weekdaynum string is invalid.public java.lang.String toString()
toString in class java.lang.Object