Enum Class ReminderTime

java.lang.Object
java.lang.Enum<ReminderTime>
com.ehealthsystem.tools.ReminderTime
All Implemented Interfaces:
Serializable, Comparable<ReminderTime>, Constable

public enum ReminderTime extends Enum<ReminderTime>
Enumeration of all possible reminder times for an appointment.
  • Enum Constant Details

    • NO_REMINDER

      public static final ReminderTime NO_REMINDER
      The user can choose the time they want to be reminded at for their appointment.
    • TEN_MINUTES

      public static final ReminderTime TEN_MINUTES
    • ONE_HOUR

      public static final ReminderTime ONE_HOUR
    • THREE_DAYS

      public static final ReminderTime THREE_DAYS
    • ONE_WEEK

      public static final ReminderTime ONE_WEEK
  • Field Details

    • label

      private final String label
    • minutes

      private final int minutes
  • Constructor Details

    • ReminderTime

      private ReminderTime(String label, int minutes)
      Constructor to set details for a reminder option
      Parameters:
      label - Label for the reminder time
      minutes - The reminder time in minutes
  • Method Details

    • values

      public static ReminderTime[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ReminderTime valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Gets the name of this enum constant.
      Overrides:
      toString in class Enum<ReminderTime>
      Returns:
      Name of the enum constant.
    • getMinutes

      public int getMinutes()
      Gets the minutes.
      Returns:
      The time in minutes.
    • getLabel

      public String getLabel()
      Get the reminder time, written out as spoken.
      Returns:
      string describing the time