Enum TIME
- All Implemented Interfaces:
Serializable,Comparable<TIME>,java.lang.constant.Constable
TIMES for weather forecast
AM_3, AM_6, AM_9, AM_12, PM_3, PM_6, PM_9, PM_12, ALL;
AM_3, AM_6, AM_9, AM_12, PM_3, PM_6, PM_9, PM_12, ALL;
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetAllEnumsExcept(TIME time) returns allTIMEvalues expect the one included in paramstatic intcase PM_12 -> 0; case AM_3 -> 1; case AM_6 -> 2; case AM_9 -> 3; case AM_12 -> 4; case PM_3 -> 5; case PM_6 -> 6; case PM_9 -> 7; case ALL -> -1;static TIMEReturns the enum constant of this type with the specified name.static TIME[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AM_3
3:00 a.m. -
AM_6
6:00 a.m. -
AM_9
9:00 a.m. -
AM_12
noon -
PM_3
3:00 p.m. -
PM_6
6:00 p.m. -
PM_9
9:00 p.m. -
PM_12
midnight -
ALL
all times
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
getIndex
case PM_12 -> 0; case AM_3 -> 1; case AM_6 -> 2; case AM_9 -> 3; case AM_12 -> 4; case PM_3 -> 5; case PM_6 -> 6; case PM_9 -> 7; case ALL -> -1;- Parameters:
time-TIME- Returns:
- its index
-
getAllEnumsExcept
returns allTIMEvalues expect the one included in param
-