public class CalendarEventProvider extends Object implements ICalendarEventProvider
Modifier and Type | Field and Description |
---|---|
protected List<ICalendarEvent> |
m_eventList |
protected List<ICalendarEvent> |
m_filteredEventList |
protected Date |
m_filterEndDate |
protected Date |
m_filterStartDate |
Constructor and Description |
---|
CalendarEventProvider()
Default constructor
|
CalendarEventProvider(ICalendarEvent[] eventsArray)
Constructor to set the list of calendar events for this provider from a
array.
|
CalendarEventProvider(List<ICalendarEvent> eventsList)
Constructor to set the list of calendar events for this provider.
|
Modifier and Type | Method and Description |
---|---|
static void |
filterCalendarEventList(List<ICalendarEvent> in,
List<ICalendarEvent> out,
Date startDate,
Date endDate) |
Date |
getEndDate()
Get the end date, of the date range, used in filtering the list of
calendar events
|
List<ICalendarEvent> |
getEventList()
Get the list of events contained by this provider.
|
protected List<ICalendarEvent> |
getFilteredEventList()
Filter the event list using the start and end dates.
|
Date |
getStartDate()
Get the start date, of the date range, used in filtering the list of
calendar events
|
protected boolean |
hasFilter()
Determines if the start or end date have been set.
|
void |
setEndDate(Date endDate)
Set the end date of the date range for this provider.
|
void |
setEventList(List<ICalendarEvent> eventList)
Set the event list of calendar events for this provider.
|
void |
setStartDate(Date startDate)
Set the start date of the date range for this provider.
|
protected List<ICalendarEvent> m_eventList
protected List<ICalendarEvent> m_filteredEventList
protected Date m_filterStartDate
protected Date m_filterEndDate
public CalendarEventProvider()
public CalendarEventProvider(List<ICalendarEvent> eventsList)
eventsList
- A list of ICalendarEvent objects.public CalendarEventProvider(ICalendarEvent[] eventsArray)
eventsArray
- An array of ICalendarEvent objects.public List<ICalendarEvent> getEventList()
getEventList
in interface ICalendarEventProvider
public void setEventList(List<ICalendarEvent> eventList)
eventList
- List of calendar events.public void setStartDate(Date startDate)
setStartDate
in interface ICalendarEventProvider
startDate
- The date to exclude events before this datepublic Date getStartDate()
public void setEndDate(Date endDate)
setEndDate
in interface ICalendarEventProvider
endDate
- The date to exclude events after this datepublic Date getEndDate()
protected boolean hasFilter()
protected List<ICalendarEvent> getFilteredEventList()
public static void filterCalendarEventList(List<ICalendarEvent> in, List<ICalendarEvent> out, Date startDate, Date endDate)