public class RecurringPattern
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
RecurringPattern.ExceptionInfo
Represents the exception info structure.
|
static class |
RecurringPattern.PatternType
Enum for the type of the pattern.
|
Modifier and Type | Field and Description |
---|---|
static int[] |
weekOfDayMask
Array with masks for days of week when the calendar item occurs.
|
Constructor and Description |
---|
RecurringPattern(byte[] data,
CalendarItemTimerTask sourceTask)
Parses the binary data that describes the recurrent pattern.
|
Modifier and Type | Method and Description |
---|---|
CalendarItemTimerTask |
next(java.util.Date previousStartDate,
java.util.Date previousEndDate)
Calculates and creates the next calendar item.
|
CalendarItemTimerTask |
nextMonth(java.util.Date startDate,
java.util.Date endDate,
boolean lastDay)
Finds the next occurrence for monthly recurrence.
|
CalendarItemTimerTask |
nextMonthN(java.util.Date startDate,
java.util.Date endDate)
Finds the next occurrence for monthly Nth recurrence.
|
java.lang.String |
toString()
Prints the properties of the class for debugging purpose.
|
static java.util.Date |
windowsTimeToDateObject(long time)
Converts windows time in minutes from 1/1/1601 to Date object.
|
public static int[] weekOfDayMask
public RecurringPattern(byte[] data, CalendarItemTimerTask sourceTask) throws java.lang.IndexOutOfBoundsException
data
- the binary data.sourceTask
- the calendar item.java.lang.IndexOutOfBoundsException
- if data can't be parsed.public static java.util.Date windowsTimeToDateObject(long time)
time
- the number of minutes from 1/1/1601public java.lang.String toString()
toString
in class java.lang.Object
public CalendarItemTimerTask next(java.util.Date previousStartDate, java.util.Date previousEndDate)
previousStartDate
- the start date of the previous occurrence.previousEndDate
- the end date of the previous occurrence.public CalendarItemTimerTask nextMonth(java.util.Date startDate, java.util.Date endDate, boolean lastDay)
startDate
- the start date of the previous calendar item.endDate
- the end date of the previous calendar item.lastDay
- if true we are interested in last day of the
monthpublic CalendarItemTimerTask nextMonthN(java.util.Date startDate, java.util.Date endDate)
startDate
- the start date of the previous calendar item.endDate
- the end date of the previous calendar item.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.