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
      today
    • TOMORROW

      public static final DAY TOMORROW
      tomorrow
    • AFTER_TOMORROW

      public static final DAY AFTER_TOMORROW
      the day after tomorrow
    • ALL

      public static final DAY ALL
      all days
  • Method Details

    • values

      public static DAY[] 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 DAY 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
    • 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(@NotNull DAY day)
      returns all DAY values expect the one included in param
      Parameters:
      day - TIME to be excluded
      Returns:
      List of all DAYs except param