Package com.ehealthsystem.tools
Enum Class ReminderTime
- All Implemented Interfaces:
Serializable
,Comparable<ReminderTime>
,Constable
Enumeration of all possible reminder times for an appointment.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe user can choose the time they want to be reminded at for their appointment. -
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
ReminderTime
(String label, int minutes) Constructor to set details for a reminder option -
Method Summary
Modifier and TypeMethodDescriptiongetLabel()
Get the reminder time, written out as spoken.int
Gets the minutes.toString()
Gets the name of this enum constant.static ReminderTime
Returns the enum constant of this class with the specified name.static ReminderTime[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NO_REMINDER
The user can choose the time they want to be reminded at for their appointment. -
TEN_MINUTES
-
ONE_HOUR
-
THREE_DAYS
-
ONE_WEEK
-
-
Field Details
-
label
-
minutes
private final int minutes
-
-
Constructor Details
-
ReminderTime
Constructor to set details for a reminder option- Parameters:
label
- Label for the reminder timeminutes
- The reminder time in minutes
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
toString
Gets the name of this enum constant.- Overrides:
toString
in classEnum<ReminderTime>
- Returns:
- Name of the enum constant.
-
getMinutes
public int getMinutes()Gets the minutes.- Returns:
- The time in minutes.
-
getLabel
Get the reminder time, written out as spoken.- Returns:
- string describing the time
-