Package net.fortuna.ical4j.model
Class ComponentGroup<T extends Component>
- java.lang.Object
-
- net.fortuna.ical4j.model.ComponentGroup<T>
-
public class ComponentGroup<T extends Component> extends Object
Support for operations applicable to a group of components. Typically this class is used to manage component revisions (whereby each revision is a separate component), and the resulting ouput of such group functions. Example - Find latest revision of an event:Calendar calendar = ... String uidString = ... ComponentGroup
Created by fortuna on 20/07/2017.group = new ComponentGroup( calendar.getComponents(Component.VEVENT), new Uid(uidString)); return group.getLatestRevision();
-
-
Constructor Summary
Constructors Constructor Description ComponentGroup(ComponentList<T> components, Uid uid)
ComponentGroup(ComponentList<T> components, Uid uid, RecurrenceId recurrenceId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PeriodList
calculateRecurrenceSet(Period period)
Calculate all recurring periods for the specified date range.T
getLatestRevision()
Returns the latest component revision based on ascending sequence number and modified date.ComponentList<T>
getRevisions()
Apply filter to all components to create a subset containing components matching the specified UID.
-
-
-
Constructor Detail
-
ComponentGroup
public ComponentGroup(ComponentList<T> components, Uid uid)
-
ComponentGroup
public ComponentGroup(ComponentList<T> components, Uid uid, RecurrenceId recurrenceId)
-
-
Method Detail
-
getRevisions
public ComponentList<T> getRevisions()
Apply filter to all components to create a subset containing components matching the specified UID.- Returns:
-
getLatestRevision
public T getLatestRevision()
Returns the latest component revision based on ascending sequence number and modified date.- Returns:
-
calculateRecurrenceSet
public PeriodList calculateRecurrenceSet(Period period)
Calculate all recurring periods for the specified date range. This method will take all revisions into account when generating the set.- Parameters:
period
-- Returns:
- See Also:
Component.calculateRecurrenceSet(Period)
-
-