Class ComponentFilter<T extends Component>

  • All Implemented Interfaces:
    PredicateFactory<T>

    public class ComponentFilter<T extends Component>
    extends AbstractFilter<T>
    ComponentFilter produces predicates for lambda-style filtering of iCalendar components.

    The following example prints all events where the event's categories contain the the word "Holiday".

     Predicate filter = new ComponentFilter().predicate(FilterExpression.contains(Property.CATEGORIES, "Holiday"));
     calendar.getComponents(Component.VEVENT).stream()
       .filter(filter)
       .forEach(System.out::println);