AlertWindow

public class AlertWindow

Contains details about alerts timings. Used to create events and to compute timings.

Constructors

AlertWindow

public AlertWindow(DateTime windowStart, DateTime windowEnd, DateTime enrolledOn, Time preferredAlertTime, Alert alert)

Creates an AlertWindow with the windowStart attribute set to windowStart, the windowEnd attribute set to windowEnd, the enrolledOn attribute set to enrolledOn, the preferredAlertTime attribute set to preferredAlertTime and the alert attribute set to alert. Also computes all alert timings.

Parameters:
  • windowStart – the start date and time of the window
  • windowEnd – the end date and time of the window
  • enrolledOn – the enrollment date and time
  • preferredAlertTime – the preferred alert time
  • alert – the alert

Methods

allPossibleAlerts

public List<DateTime> allPossibleAlerts()

Returns all possible alerts timings.

Returns:all possible alerts timings.

numberOfAlertsToSchedule

public int numberOfAlertsToSchedule()

Returns the number of the alerts to schedule.

Returns:the number of the alerts to schedule

scheduledAlertStartDate

public DateTime scheduledAlertStartDate()

Returns the alert start date and time.

Returns:the alert start date and time.