Skip to content

Commit

Permalink
Added convenience method
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Jan 9, 2022
1 parent 3042768 commit 177dddf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/net/fortuna/ical4j/model/PropertyContainer.java
@@ -1,5 +1,6 @@
package net.fortuna.ical4j.model;

import java.util.Collection;
import java.util.List;
import java.util.Optional;

Expand Down Expand Up @@ -38,6 +39,16 @@ default PropertyContainer add(Property property) {
return this;
}

/**
* Add multiple properties to the container.
* @param properties a collection of properties to add
* @return a reference to the container to support method chaining
*/
default PropertyContainer addAll(Collection<Property> properties) {
setPropertyList((PropertyList) getPropertyList().addAll(properties));
return this;
}

/**
* Remove a property from the container.
* @param property the property to remove
Expand Down

0 comments on commit 177dddf

Please sign in to comment.