Module ical4j.core

Interface PropertyContainer

All Superinterfaces:
PropertyListAccessor
All Known Subinterfaces:
CalendarPropertyAccessor, ChangeManagementPropertyAccessor, DateTimePropertyAccessor, DescriptivePropertyAccessor, RecurrenceSupport<T>, RelationshipPropertyAccessor, TimeZonePropertyAccessor
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 extends PropertyListAccessor
  • Field Details

  • Method Details

    • setPropertyList

      void setPropertyList(PropertyList properties)
    • add

      default <T extends PropertyContainer> T add(@NotNull @NotNull Property property)
      Add a property to the container.
      Parameters:
      property - the property to add
      Returns:
      a reference to the container to support method chaining
    • addAll

      default <T extends PropertyContainer> T addAll(@NotNull @NotNull Collection<Property> properties)
      Add multiple properties to the container.
      Parameters:
      properties - a collection of properties to add
      Returns:
      a reference to the container to support method chaining
    • remove

      default <T extends PropertyContainer> T 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 <T extends PropertyContainer> T 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
    • removeIf

      default <T extends PropertyContainer> T removeIf(Predicate<Property> filter)
      Remove all properties matching the specified filter.
      Parameters:
      filter - a filter predicate for matching
      Returns:
      a reference to the container to support method chaining
    • replace

      default <T extends PropertyContainer> T 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
    • with

      default <T extends PropertyContainer, P> T with(BiFunction<T,P,T> f, P p)
      A functional method used to apply a property to a container in an undefined way. For example, a null check can be introduced as follows: container.with((c, p) -> if (p != null) c.add(p); return c;)
      Type Parameters:
      T -
      Parameters:
      f -
      p -
      Returns: