public class RecurrenceSet extends Object implements Serializable
Recurrence
objects as
a single unit.
A Schedule
definition can use this to define a complex case
consisting of multiple recurrences (final schedule recurrence would be
a union of these individual recurrences).
Recurrence
,
Schedule
,
Serialized FormConstructor and Description |
---|
RecurrenceSet()
Constructs a new instance of RecurrenceSet.
|
RecurrenceSet(Recurrence[] recurrences)
Constructs a new instance with the given recurrences.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Recurrence recurrence)
Add a Recurrence to this object.
|
boolean |
equals(Object obj)
Compares an object for equality with this RecurrenceSet object.
|
Iterator |
iterator()
Returns an iterator for list of Recurrence.
|
void |
remove(Recurrence recurrence)
Method to remove a Recurrence from this RecurrenceSet object.
|
int |
size()
Returns the size of this RecurrenceSet.
|
String |
toString()
Returns a String representation for this RecurrenceSet object.
|
void |
validate()
Validates this instance of RecurrenceSet.
|
public RecurrenceSet()
public RecurrenceSet(Recurrence[] recurrences) throws ValidationException
recurrences
- - collection of recurrence instances for the new instance.ValidationException
public void add(Recurrence recurrence) throws ValidationException
recurrence
- - instance of Recurrence to be added to this object.ValidationException
public void remove(Recurrence recurrence)
recurrence
- - the Recurrence instance to be removed from the
list of recurrences contained in this object.public Iterator iterator()
public int size()
public void validate() throws ValidationException
The method performs checks that are possible on this object.
ValidationException
- - thrown if any invalid data is detected.public boolean equals(Object obj)