public static class Recurrence.Builder extends Object
Recurrence
objects.Constructor and Description |
---|
Recurrence.Builder(Recurrence.Frequency frequency)
Constructs a new builder.
|
Recurrence.Builder(Recurrence recur)
Constructs a new builder
|
Modifier and Type | Method and Description |
---|---|
Recurrence |
build()
Builds the final
Recurrence object. |
Recurrence.Builder |
byDay(Collection<Recurrence.DayOfWeek> days)
Adds one or more BYDAY rule parts.
|
Recurrence.Builder |
byDay(Integer num,
Recurrence.DayOfWeek day)
Adds a BYDAY rule part.
|
Recurrence.Builder |
byDay(Recurrence.DayOfWeek... days)
Adds one or more BYDAY rule parts.
|
Recurrence.Builder |
byHour(Collection<Integer> hours)
Adds one or more BYHOUR rule parts.
|
Recurrence.Builder |
byHour(Integer... hours)
Adds one or more BYHOUR rule parts.
|
Recurrence.Builder |
byMinute(Collection<Integer> minutes)
Adds one or more BYMINUTE rule parts.
|
Recurrence.Builder |
byMinute(Integer... minutes)
Adds one or more BYMINUTE rule parts.
|
Recurrence.Builder |
byMonth(Collection<Integer> months)
Adds one or more BYMONTH rule parts.
|
Recurrence.Builder |
byMonth(Integer... months)
Adds one or more BYMONTH rule parts.
|
Recurrence.Builder |
byMonthDay(Collection<Integer> monthDays)
Adds one or more BYMONTHDAY rule parts.
|
Recurrence.Builder |
byMonthDay(Integer... monthDays)
Adds one or more BYMONTHDAY rule parts.
|
Recurrence.Builder |
bySecond(Collection<Integer> seconds)
Adds one or more BYSECOND rule parts.
|
Recurrence.Builder |
bySecond(Integer... seconds)
Adds one or more BYSECOND rule parts.
|
Recurrence.Builder |
bySetPos(Collection<Integer> positions)
Adds one or more BYSETPOS rule parts.
|
Recurrence.Builder |
bySetPos(Integer... positions)
Adds one or more BYSETPOS rule parts.
|
Recurrence.Builder |
byWeekNo(Collection<Integer> weekNumbers)
Adds one or more BYWEEKNO rule parts.
|
Recurrence.Builder |
byWeekNo(Integer... weekNumbers)
Adds one or more BYWEEKNO rule parts.
|
Recurrence.Builder |
byYearDay(Collection<Integer> yearDays)
Adds one or more BYYEARDAY rule parts.
|
Recurrence.Builder |
byYearDay(Integer... yearDays)
Adds one or more BYYEARDAY rule parts.
|
Recurrence.Builder |
count(Integer count)
Gets the number of times the rule will be repeated.
|
Recurrence.Builder |
frequency(Recurrence.Frequency frequency)
Sets the frequency
|
Recurrence.Builder |
interval(Integer interval)
Gets how often the rule repeats, in relation to the frequency.
|
Recurrence.Builder |
until(Date until)
Sets the date that the recurrence stops.
|
Recurrence.Builder |
until(Date until,
boolean hasTime)
Sets the date that the recurrence stops.
|
Recurrence.Builder |
until(ICalDate until)
Sets the date that the recurrence stops.
|
Recurrence.Builder |
workweekStarts(Recurrence.DayOfWeek day)
Sets the day that the work week starts.
|
Recurrence.Builder |
xrule(String name,
String value)
Adds a non-standard rule part.
|
public Recurrence.Builder(Recurrence.Frequency frequency)
frequency
- the recurrence frequencypublic Recurrence.Builder(Recurrence recur)
recur
- the recurrence object to copy frompublic Recurrence.Builder frequency(Recurrence.Frequency frequency)
frequency
- the frequencypublic Recurrence.Builder until(ICalDate until)
until
- the datepublic Recurrence.Builder until(Date until)
until
- the date (time component will be included)public Recurrence.Builder until(Date until, boolean hasTime)
until
- the datehasTime
- true to include the time component, false if it's
strictly a datepublic Recurrence.Builder count(Integer count)
count
- the number of times to repeat the rulepublic Recurrence.Builder interval(Integer interval)
interval
- the repetition intervalpublic Recurrence.Builder bySecond(Integer... seconds)
seconds
- the seconds to addpublic Recurrence.Builder bySecond(Collection<Integer> seconds)
seconds
- the seconds to addpublic Recurrence.Builder byMinute(Integer... minutes)
minutes
- the minutes to addpublic Recurrence.Builder byMinute(Collection<Integer> minutes)
minutes
- the minutes to addpublic Recurrence.Builder byHour(Integer... hours)
hours
- the hours to addpublic Recurrence.Builder byHour(Collection<Integer> hours)
hours
- the hours to addpublic Recurrence.Builder byMonthDay(Integer... monthDays)
monthDays
- the month days to addpublic Recurrence.Builder byMonthDay(Collection<Integer> monthDays)
monthDays
- the month days to addpublic Recurrence.Builder byYearDay(Integer... yearDays)
yearDays
- the year days to addpublic Recurrence.Builder byYearDay(Collection<Integer> yearDays)
yearDays
- the year days to addpublic Recurrence.Builder byWeekNo(Integer... weekNumbers)
weekNumbers
- the week numbers to addpublic Recurrence.Builder byWeekNo(Collection<Integer> weekNumbers)
weekNumbers
- the week numbers to addpublic Recurrence.Builder byMonth(Integer... months)
months
- the months to addpublic Recurrence.Builder byMonth(Collection<Integer> months)
months
- the months to addpublic Recurrence.Builder bySetPos(Integer... positions)
positions
- the values to addpublic Recurrence.Builder bySetPos(Collection<Integer> positions)
positions
- the values to addpublic Recurrence.Builder byDay(Recurrence.DayOfWeek... days)
days
- the days to addpublic Recurrence.Builder byDay(Collection<Recurrence.DayOfWeek> days)
days
- the days to addpublic Recurrence.Builder byDay(Integer num, Recurrence.DayOfWeek day)
num
- the numeric componentday
- the day to addpublic Recurrence.Builder workweekStarts(Recurrence.DayOfWeek day)
day
- the daypublic Recurrence.Builder xrule(String name, String value)
name
- the namevalue
- the value or null to remove the rule partpublic Recurrence build()
Recurrence
object.Copyright © 2013-2015 Michael Angstadt. All Rights Reserved.