public class Recurrence
extends Object
implements Serializable
Modifier and Type | Field and Description |
---|---|
protected DayAndPosition[] |
byDay
Field byDay
|
protected int[] |
byMonth
Field byMonth
|
protected int[] |
byMonthDay
Field byMonthDay
|
protected int[] |
byWeekNo
Field byWeekNo
|
protected int[] |
byYearDay
Field byYearDay
|
static int |
DAILY
Field DAILY
|
protected Calendar |
dtStart
Field dtStart
|
protected Duration |
duration
Field duration
|
protected int |
frequency
Field frequency
|
protected int |
interval
Field interval
|
static int |
MONTHLY
Field MONTHLY
|
static int |
NO_RECURRENCE
Field NO_RECURRENCE
|
protected int |
occurrence
Field interval
|
protected Calendar |
until
Field until
|
static int |
WEEKLY
Field WEEKLY
|
static int |
YEARLY
Field YEARLY
|
Constructor and Description |
---|
Recurrence()
Constructor Recurrence
|
Recurrence(Calendar start,
Duration dur)
Constructor Recurrence
|
Recurrence(Calendar start,
Duration dur,
int freq)
Constructor Recurrence
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
candidateIsInRecurrence(Calendar candidate,
boolean debug)
Method candidateIsInRecurrence
|
DayAndPosition[] |
getByDay()
Method getByDay
|
int[] |
getByMonth()
Method getByMonth
|
int[] |
getByMonthDay()
Method getByMonthDay
|
int[] |
getByWeekNo()
Method getByWeekNo
|
int[] |
getByYearDay()
Method getByYearDay
|
Calendar |
getCandidateStartTime(Calendar current)
Method getCandidateStartTime
|
protected static long |
getDayNumber(Calendar cal)
Method getDayNumber
|
Calendar |
getDtEnd()
Method getDtEnd
|
Calendar |
getDtStart()
Method getDtStart
|
Duration |
getDuration()
Method getDuration
|
int |
getFrequency()
Method getFrequency
|
int |
getInterval()
Method getInterval
|
protected int |
getMinimumInterval()
Method getMinimumInterval
|
protected static long |
getMonthNumber(Calendar cal)
Method getMonthNumber
|
int |
getOccurrence()
Method getOccurrence
|
protected int |
getRecurrenceCount(Calendar candidate)
Method getRecurrenceCount
|
Calendar |
getUntil()
Method getUntil
|
protected static long |
getWeekNumber(Calendar cal)
Method getWeekNumber
|
int |
getWeekStart()
Method getWeekStart
|
boolean |
isInRecurrence(Calendar current)
Method isInRecurrence
|
boolean |
isInRecurrence(Calendar current,
boolean debug)
Method isInRecurrence
|
protected boolean |
matchesByDay(Calendar candidate)
Method matchesByDay
|
protected boolean |
matchesByField(int[] array,
int field,
Calendar candidate,
boolean allowNegative)
Method matchesByField
|
protected boolean |
matchesByMonth(Calendar candidate)
Method matchesByMonth
|
protected boolean |
matchesByMonthDay(Calendar candidate)
Method matchesByMonthDay
|
protected boolean |
matchesByWeekNo(Calendar candidate)
Method matchesByWeekNo
|
protected boolean |
matchesByYearDay(Calendar candidate)
Method matchesByYearDay
|
protected boolean |
matchesIndividualByDay(Calendar candidate,
DayAndPosition pos)
Method matchesIndividualByDay
|
protected static void |
reduce_constant_length_field(int field,
Calendar start,
Calendar candidate)
Method reduce_constant_length_field
|
protected static void |
reduce_day_of_month(Calendar start,
Calendar candidate)
Method reduce_day_of_month
|
protected static void |
reduce_day_of_year(Calendar start,
Calendar candidate)
Method reduce_day_of_year
|
void |
setByDay(DayAndPosition[] b)
Method setByDay
|
void |
setByMonth(int[] b)
Method setByMonth
|
void |
setByMonthDay(int[] b)
Method setByMonthDay
|
void |
setByWeekNo(int[] b)
Method setByWeekNo
|
void |
setByYearDay(int[] b)
Method setByYearDay
|
void |
setDtEnd(Calendar end)
Method setDtEnd
|
void |
setDtStart(Calendar start)
Method setDtStart
|
void |
setDuration(Duration d)
Method setDuration
|
void |
setFrequency(int freq)
Method setFrequency
|
void |
setInterval(int intr)
Method setInterval
|
void |
setOccurrence(int occur)
Method setOccurrence
|
void |
setUntil(Calendar u)
Method setUntil
|
void |
setWeekStart(int weekstart)
Method setWeekStart
|
protected String |
stringizeIntArray(int[] a)
Method stringizeIntArray
|
String |
toString()
Method toString
|
public static final int DAILY
public static final int MONTHLY
public static final int NO_RECURRENCE
public static final int WEEKLY
public static final int YEARLY
protected DayAndPosition[] byDay
protected int[] byMonth
protected int[] byMonthDay
protected int[] byWeekNo
protected int[] byYearDay
protected Calendar dtStart
protected Duration duration
protected int frequency
protected int interval
protected int occurrence
protected Calendar until
public Recurrence()
public Recurrence(Calendar start, Duration dur)
public Recurrence(Calendar start, Duration dur, int freq)
public DayAndPosition[] getByDay()
public int[] getByMonth()
public int[] getByMonthDay()
public int[] getByWeekNo()
public int[] getByYearDay()
public Calendar getCandidateStartTime(Calendar current)
current
- the current timepublic Calendar getDtEnd()
public Calendar getDtStart()
public Duration getDuration()
public int getFrequency()
public int getInterval()
public int getOccurrence()
public Calendar getUntil()
public int getWeekStart()
public boolean isInRecurrence(Calendar current)
current
- the current timepublic boolean isInRecurrence(Calendar current, boolean debug)
current
- the current timedebug
- whether to print debug messagespublic void setByDay(DayAndPosition[] b)
public void setByMonth(int[] b)
public void setByMonthDay(int[] b)
public void setByWeekNo(int[] b)
public void setByYearDay(int[] b)
public void setDtEnd(Calendar end)
public void setDtStart(Calendar start)
public void setDuration(Duration d)
public void setFrequency(int freq)
public void setInterval(int intr)
public void setOccurrence(int occur)
public void setUntil(Calendar u)
public void setWeekStart(int weekstart)
public String toString()
toString
in class Object
protected static long getDayNumber(Calendar cal)
protected static long getMonthNumber(Calendar cal)
protected static long getWeekNumber(Calendar cal)
protected static void reduce_constant_length_field(int field, Calendar start, Calendar candidate)
protected static void reduce_day_of_month(Calendar start, Calendar candidate)
protected static void reduce_day_of_year(Calendar start, Calendar candidate)
protected boolean candidateIsInRecurrence(Calendar candidate, boolean debug)
protected int getMinimumInterval()
protected int getRecurrenceCount(Calendar candidate)
protected boolean matchesByDay(Calendar candidate)
protected boolean matchesByField(int[] array, int field, Calendar candidate, boolean allowNegative)
protected boolean matchesByMonth(Calendar candidate)
protected boolean matchesByMonthDay(Calendar candidate)
protected boolean matchesByWeekNo(Calendar candidate)
protected boolean matchesByYearDay(Calendar candidate)
protected boolean matchesIndividualByDay(Calendar candidate, DayAndPosition pos)
protected String stringizeIntArray(int[] a)