java.lang.Object
java.lang.Enum<Season>
develop.toolkit.world.normal.Season
All Implemented Interfaces:
Serializable, Comparable<Season>, java.lang.constant.Constable

public enum Season extends Enum<Season>
四季
Author:
qiushui on 2019-04-28.
  • Enum Constant Details

    • SPRING

      public static final Season SPRING
    • SUMMER

      public static final Season SUMMER
    • AUTUMN

      public static final Season AUTUMN
    • WINTER

      public static final Season WINTER
  • Method Details

    • values

      public static Season[] 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

      public static Season valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • range

      public TwoValues<MonthDay,MonthDay> range()
      日期范围
    • getDayOfSeason

      public int getDayOfSeason(LocalDate day)
      这一天是这个季节的第几天
    • dayAt

      public static Season dayAt(MonthDay monthDay)
      日期落在哪个季节
    • isDayAt

      public static boolean isDayAt(MonthDay monthDay, Season season)
      日期是否是某个季节
    • valueOf

      public static Season valueOf(int value)