Package org.silverpeas.core.calendar
Class CalendarEvents
- java.lang.Object
-
- org.silverpeas.core.calendar.CalendarEvents
-
public class CalendarEvents extends Object
This class permits to get events belonging calendars. Some constraints can be done to filter the events.- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CalendarEvents
filter(Consumer<CalendarEventFilter> filterConsumer)
Filters the calendar events according to some predefined conditions.Stream<CalendarEvent>
stream()
Gets as a stream all the events verifying the filters if any.
Please be careful to always close the streams in order to avoid memory leaks!!!
-
-
-
Method Detail
-
filter
public CalendarEvents filter(Consumer<CalendarEventFilter> filterConsumer)
Filters the calendar events according to some predefined conditions. The different criterion can be combined together to build a more complete criterion.- Parameters:
filterConsumer
- a function accepting aCalendarEventFilter
instance to set the different filtering criteria.- Returns:
- itself.
-
stream
public Stream<CalendarEvent> stream()
Gets as a stream all the events verifying the filters if any.
Please be careful to always close the streams in order to avoid memory leaks!!!- Returns:
- a stream of events verifying the filters.
-
-