Enum DAY
- All Implemented Interfaces:
Serializable,Comparable<DAY>,java.lang.constant.Constable
DAYs for weather forecast
TODAY, TOMORROW, AFTER_TOMORROW, ALL;
TODAY, TOMORROW, AFTER_TOMORROW, ALL;
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionthe day after tomorrowall daystodaytomorrow -
Method Summary
Modifier and TypeMethodDescriptiongetAllDaysExcept(DAY day) returns allDAYvalues expect the one included in paramstatic intcase TODAY -> 0; case TOMORROW -> 1; case AFTER_TOMORROW -> 2; case ALL -> -1;static DAYReturns the enum constant of this type with the specified name.static DAY[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
TODAY
today -
TOMORROW
tomorrow -
AFTER_TOMORROW
the day after tomorrow -
ALL
all days
-
-
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 TODAY -> 0; case TOMORROW -> 1; case AFTER_TOMORROW -> 2; case ALL -> -1;- Parameters:
day-DAY- Returns:
- DAY's index
-
getAllDaysExcept
returns allDAYvalues expect the one included in param
-