Enum Class Weekday

java.lang.Object
java.lang.Enum<Weekday>
com.targomo.client.api.enums.Weekday
All Implemented Interfaces:
Serializable, Comparable<Weekday>, java.lang.constant.Constable

public enum Weekday extends Enum<Weekday>
Enum denoting Day of the week with int values for both monday->sunday and sunday->saturday.
  • Enum Constant Details

    • SUNDAY

      public static final Weekday SUNDAY
    • MONDAY

      public static final Weekday MONDAY
    • TUESDAY

      public static final Weekday TUESDAY
    • WEDNESDAY

      public static final Weekday WEDNESDAY
    • THURSDAY

      public static final Weekday THURSDAY
    • FRIDAY

      public static final Weekday FRIDAY
    • SATURDAY

      public static final Weekday SATURDAY
  • Field Details

    • weekdaySunMon

      public final int weekdaySunMon
    • weekdayMonSun

      public final int weekdayMonSun
  • Method Details

    • values

      public static Weekday[] 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 Weekday 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
    • fromString

      public static Weekday fromString(String key)
      Get the GeometryType based on a key string if one of the three allowed types (Polygon, Multipolygon, Linestring)
      Parameters:
      key - geometry type as a string. will be converted to all lowercase
      Returns:
      GeometryType if one of the three allowed types
      Throws:
      IllegalArgumentException - if the key is not one of the three allowed types
    • fromIntMonSun

      public static Weekday fromIntMonSun(int day)
      Takes an integer value from 0-6 (inclusive) and returns a day of the week. Starts with Monday at 0 and ends with Sunday at 6
      Parameters:
      day - Int value 0-6 (inclusive)
      Returns:
      Day of the week corresponding to the provided integer
      Throws:
      IllegalArgumentException - if the number is outside the range 0-6 (inclusive)
    • fromIntSunMon

      public static Weekday fromIntSunMon(int day)
      Takes an integer value from 0-6 (inclusive) and returns a day of the week. Starts with Sunday at 0 and ends with Saturday at 6
      Parameters:
      day - Int value 0-6 (inclusive)
      Returns:
      Day of the week corresponding to the provided integer
      Throws:
      IllegalArgumentException - if the number is outside the range 0-6 (inclusive)