- All Implemented Interfaces:
Serializable,Comparable<Season>,java.lang.constant.Constable
四季
- Author:
- qiushui on 2019-04-28.
-
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 TypeMethodDescriptionstatic Season日期落在哪个季节intgetDayOfSeason(LocalDate day) 这一天是这个季节的第几天static boolean日期是否是某个季节range()日期范围static SeasonvalueOf(int value) 值static SeasonReturns the enum constant of this type with the specified name.static Season[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SPRING
-
SUMMER
-
AUTUMN
-
WINTER
-
-
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
-
range
日期范围 -
getDayOfSeason
这一天是这个季节的第几天 -
dayAt
日期落在哪个季节 -
isDayAt
日期是否是某个季节 -
valueOf
值
-