java.lang.Object
java.lang.Enum<DAY>
cz.krystofcejchan.lite_weather_lib.enums_exception.enums.DAY
All Implemented Interfaces:
Serializable, Comparable<DAY>, java.lang.constant.Constable

public enum DAY extends Enum<DAY>
DAYs for weather forecast
TODAY, TOMORROW, AFTER_TOMORROW, ALL;
  • Enum Constant Details

    • TODAY

      public static final DAY TODAY
    • TOMORROW

      public static final DAY TOMORROW
    • AFTER_TOMORROW

      public static final DAY AFTER_TOMORROW
    • ALL

      public static final DAY ALL
  • Method Details

    • values

      public static DAY[] 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 DAY 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
    • getIndex

      public static int getIndex(DAY day)
      case TODAY -> 0; case TOMORROW -> 1; case AFTER_TOMORROW -> 2; case ALL -> -1;
      Parameters:
      day - DAY
      Returns:
      DAY's index
    • getAllDaysExcept

      public static List<DAY> getAllDaysExcept(DAY day)