public class RecurrenceSet
extends java.lang.Object
This class allows you to add any number of recurrence rules, recurrence
instances, exception rules and exception instance. It returns an Iterator that iterates all resulting instances.
| Constructor and Description |
|---|
RecurrenceSet() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExceptions(AbstractRecurrenceAdapter adapter)
Add exceptions to the set of instances (i.e. effectively remove instances from the instance set).
|
void |
addInstances(AbstractRecurrenceAdapter adapter)
Add instances to the set of instances.
|
long |
getLastInstance(java.util.TimeZone timezone,
long start) |
boolean |
isInfinite()
Returns whether this
RecurrenceSet contains an infinite number of instances. |
RecurrenceSetIterator |
iterator(java.util.TimeZone timezone,
long start)
Get an iterator for the specified start time.
|
RecurrenceSetIterator |
iterator(java.util.TimeZone timezone,
long start,
long end)
Return a new
RecurrenceSetIterator for this recurrence set. |
public void addInstances(AbstractRecurrenceAdapter adapter)
adapter - An AbstractRecurrenceAdapter that defines instances.public void addExceptions(AbstractRecurrenceAdapter adapter)
adapter - An AbstractRecurrenceAdapter that defines instances.public RecurrenceSetIterator iterator(java.util.TimeZone timezone, long start)
timezone - The TimeZone of the first instance.start - The start time in milliseconds since the epoch.RecurrenceSetIterator that iterates all instances.public RecurrenceSetIterator iterator(java.util.TimeZone timezone, long start, long end)
RecurrenceSetIterator for this recurrence set.timezone - The TimeZone of the first instance.start - The start time in milliseconds since the epoch.end - The end of the time range to iterate in milliseconds since the epoch.RecurrenceSetIterator that iterates all instances.public boolean isInfinite()
RecurrenceSet contains an infinite number of instances.true if the instances in this RecurrenceSet is infinite, false otherwise.public long getLastInstance(java.util.TimeZone timezone,
long start)