Package net.fortuna.ical4j.model
Interface ComponentContainer<T extends Component>
-
- All Known Implementing Classes:
Calendar
,Participant
,VAvailability
,VEvent
,VFreeBusy
,VJournal
,VTimeZone
,VToDo
public interface ComponentContainer<T extends Component>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ComponentContainer<T>
add(T component)
Add a subcomponent to this component.default <C extends T>
Optional<C>getComponent(String name)
ComponentList<T>
getComponentList()
default <C extends T>
List<C>getComponents(String... name)
default ComponentContainer<T>
remove(T component)
Remove a subcomponent from this component.default ComponentContainer<T>
replace(T component)
Add a subcomponent to this component whilst removing all other subcomponents with the same component name.void
setComponentList(ComponentList<T> components)
-
-
-
Method Detail
-
getComponentList
ComponentList<T> getComponentList()
-
setComponentList
void setComponentList(ComponentList<T> components)
-
add
default ComponentContainer<T> add(T component)
Add a subcomponent to this component.- Parameters:
component
- the subcomponent to add- Returns:
- a reference to this component to support method chaining
-
remove
default ComponentContainer<T> remove(T component)
Remove a subcomponent from this component.- Parameters:
component
- the subcomponent to remove- Returns:
- a reference to this component to support method chaining
-
replace
default ComponentContainer<T> replace(T component)
Add a subcomponent to this component whilst removing all other subcomponents with the same component name.- Parameters:
component
- the subcomponent to add- Returns:
- a reference to the component to support method chaining
-
-