Enum Class Constellation

java.lang.Object
java.lang.Enum<Constellation>
org.miaixz.bus.core.center.date.culture.en.Constellation
All Implemented Interfaces:
Serializable, Comparable<Constellation>, Constable

public enum Constellation extends Enum<Constellation>
星座
Since:
Java 17+
Author:
Kimi Liu
  • Enum Constant Details

  • Method Details

    • values

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

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

      public static Constellation get(int code)
      按宫位获取星座
      Parameters:
      code - 编码
      Returns:
      this
    • get

      public static Constellation get(LocalDate date)
      按日期获取星座
      Parameters:
      date - 日期
      Returns:
      this
    • get

      public static Constellation get(int month, int day)
      按月日获取星座
      Parameters:
      month - 月份
      day - 日期
      Returns:
      this
    • get

      public static Constellation get(MonthDay monthDay)
      按月日获取星座
      Parameters:
      monthDay - 月份
      Returns:
      this
    • getName

      public static String getName(Date date)
      通过生日计算星座
      Parameters:
      date - 出生日期
      Returns:
      星座名
    • getName

      public static String getName(Calendar calendar)
      通过生日计算星座
      Parameters:
      calendar - 出生日期
      Returns:
      星座名
    • getName

      public static String getName(Month month, int day)
      通过生日计算星座
      Parameters:
      month - 月,从0开始计数
      day - 天
      Returns:
      星座名
    • getName

      public static String getName(int month, int day)
      通过生日计算星座
      Parameters:
      month - 月,从0开始计数,见Month.getValue()
      day - 天
      Returns:
      星座名
    • get

      public static String[] get(String fieldName)
      获取枚举属性信息
      Parameters:
      fieldName - 属性名称
      Returns:
      the string[]
    • getName

      public String getName(int code)
      Returns:
      对应的名称
    • getCode

      public long getCode()
      Returns:
      单位对应的编码
    • getName

      public String getName()
      Returns:
      对应的名称