com.geotab.model.enumeration.DayOfWeek Maven / Gradle / Ivy
package com.geotab.model.enumeration;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* We need a DayOfWeek type that starts with Sunday as the first value / index zero. {@link
* java.time.DayOfWeek} is different, starting with Monday on the first position.
*/
public enum DayOfWeek {
SUNDAY("Sunday"),
MONDAY("Monday"),
TUESDAY("Tuesday"),
WEDNESDAY("Wednesday"),
THURSDAY("Thursday"),
FRIDAY("Friday"),
SATURDAY("Saturday");
private String name;
DayOfWeek(String name) {
this.name = name;
}
@JsonValue
public String getName() {
return name;
}
}