|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.borg.model.Repeat
public class Repeat
A helper class for calculating all things about repeating appointments. It is mainly an iterator that can take repeat parameters for an appointment and iterate through the repeats
Field Summary | |
---|---|
static String |
BIWEEKLY
|
static String |
DAILY
|
static String |
DAYLIST
|
static String |
MONTHLY
|
static String |
MONTHLY_DAY
|
static String |
MWF
|
static String |
NDAYS
|
static String |
ONCE
|
static String |
TTH
|
static String |
WEEKDAYS
|
static String |
WEEKENDS
|
static String |
WEEKLY
|
static String |
YEARLY
|
Constructor Summary | |
---|---|
Repeat(Calendar start,
String frequency)
Instantiates a new repeat object |
Method Summary | |
---|---|
static int |
calculateRepeatNumber(Calendar current,
Appointment appt)
Calculate the number of a repeat given the date and the appointment |
static int |
calculateTimes(Appointment appt)
calculate the repeat times value for an appointment based on the until date or the repeat times |
(package private) Calendar |
current()
get the current date of this iterator |
static String |
freqString(String uistring,
Integer ndays,
boolean rptnum,
Collection<Integer> daylist)
generate the encoded frequency string that is stored in the appointment - that encodes frequency, daylist, and repeat number flag |
static String |
freqToEnglish(String fr)
convert the translated frequency string to the internal string |
static Collection<Integer> |
getDaylist(String f)
Gets the daylist from the encoded appointment string |
static String |
getFreq(String f)
Gets the frequency from the encoded appointment string |
static String |
getFreqString(int i)
get the translated string for a frequency |
static String |
getFreqString(String fr)
get the translated string for a frequency |
static int |
getNDays(String f)
Gets the n days from the encoded appointment string |
static boolean |
getRptNum(String f)
Gets the repeat number flag from the encoded appointment string |
static boolean |
isCompatible(Calendar date,
String freq,
Collection<Integer> daylist)
Checks to see if a particular day is valid for certain strict repeat types |
(package private) boolean |
isRepeating()
|
static boolean |
isRepeating(Appointment ap)
Checks if an appointment repeats |
(package private) Calendar |
next()
iterate to the next repeat date. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TTH
public static final String MWF
public static final String WEEKENDS
public static final String WEEKDAYS
public static final String YEARLY
public static final String MONTHLY_DAY
public static final String MONTHLY
public static final String BIWEEKLY
public static final String WEEKLY
public static final String DAILY
public static final String NDAYS
public static final String DAYLIST
public static final String ONCE
Constructor Detail |
---|
Repeat(Calendar start, String frequency)
start
- the start date of the repeat (the appointment date)frequency
- the frequency string from the appointmentMethod Detail |
---|
public static boolean isCompatible(Calendar date, String freq, Collection<Integer> daylist)
date
- the datefreq
- the frequencydaylist
- the daylist (for repeat with a list of days)
public static String getFreqString(int i)
i
- the index of the frequency
public static String getFreqString(String fr)
fr
- the internal frequency string
public static String freqToEnglish(String fr)
fr
- the trnalsated frequency
public static String freqString(String uistring, Integer ndays, boolean rptnum, Collection<Integer> daylist)
uistring
- the translated frequency string from the uindays
- the ndays field from the UI for NDAYS repeatingrptnum
- the "show repeat number" flagdaylist
- the daylist for DAYLIST repeating
public static String getFreq(String f)
f
- the frequency string from the appointment
public static boolean getRptNum(String f)
f
- the frequency string from the appointment
public static Collection<Integer> getDaylist(String f)
f
- the frequency string from the appointment
public static int getNDays(String f)
f
- the encoded appointment string
final boolean isRepeating()
public static boolean isRepeating(Appointment ap)
ap
- the appointment
final Calendar current()
public static final int calculateRepeatNumber(Calendar current, Appointment appt)
current
- the dateappt
- the appointment
final Calendar next()
public static int calculateTimes(Appointment appt)
appt
- the appointment
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |