Package net.fortuna.ical4j.model
Interface PropertyContainer
-
- All Known Implementing Classes:
Available
,Calendar
,CalendarComponent
,Component
,Daylight
,Observance
,Participant
,Standard
,VAlarm
,VAvailability
,VEvent
,VFreeBusy
,VJournal
,VLocation
,VResource
,VTimeZone
,VToDo
,VVenue
,XComponent
public interface PropertyContainer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default PropertyContainer
add(Property property)
Add a property to the container.default <T extends Property>
List<T>getProperties(String... name)
default <T extends Property>
Optional<T>getProperty(String name)
PropertyList
getPropertyList()
default <T extends Property>
TgetRequiredProperty(String name)
Convenience method for retrieving a required named property.default PropertyContainer
remove(Property property)
Remove a property from the container.default PropertyContainer
removeAll(String... name)
Remove all properties with the matching name.default PropertyContainer
replace(Property property)
Add a property to the container whilst removing all other properties with the same property name.void
setPropertyList(PropertyList properties)
-
-
-
Method Detail
-
getPropertyList
PropertyList getPropertyList()
-
setPropertyList
void setPropertyList(PropertyList properties)
-
getRequiredProperty
default <T extends Property> T getRequiredProperty(String name) throws ConstraintViolationException
Convenience method for retrieving a required named property.- Parameters:
name
- name of the property to retrieve- Returns:
- the first matching property in the property list with the specified name
- Throws:
ConstraintViolationException
- when a property is not found
-
add
default PropertyContainer add(Property property)
Add a property to the container.- Parameters:
property
- the property to add- Returns:
- a reference to the container to support method chaining
-
remove
default PropertyContainer remove(Property property)
Remove a property from the container.- Parameters:
property
- the property to remove- Returns:
- a reference to the container to support method chaining
-
removeAll
default PropertyContainer removeAll(String... name)
Remove all properties with the matching name.- Parameters:
name
- name of the properties to remove- Returns:
- a reference to the container to support method chaining
-
replace
default PropertyContainer replace(Property property)
Add a property to the container whilst removing all other properties with the same property name.- Parameters:
property
- the property to add- Returns:
- a reference to the container to support method chaining
-
-