| 53 | * @author Meno Hochschild |
| 54 | */ |
| 55 | public enum Weekday |
| 56 | implements ChronoCondition<GregorianDate>, ChronoOperator<PlainDate>, ThreetenAdapter { |
| 57 | |
| 58 | //~ Statische Felder/Initialisierungen -------------------------------- |
| 59 | |
| 60 | /** Monday with the numerical ISO-value {@code 1}. */ |
| 61 | /*[deutsch] Montag mit dem numerischen ISO-Wert {@code 1}. */ |
| 62 | MONDAY, |
| 63 | |
| 64 | /** Tuesday with the numerical ISO-value {@code 2}. */ |
| 65 | /*[deutsch] Dienstag mit dem numerischen ISO-Wert {@code 2}. */ |
| 66 | TUESDAY, |
| 67 | |
| 68 | /** Wednesday with the numerical ISO-value {@code 3}. */ |
| 69 | /*[deutsch] Mittwoch mit dem numerischen ISO-Wert {@code 3}. */ |
| 70 | WEDNESDAY, |
| 71 | |
| 72 | /** Thursday with the numerical ISO-value {@code 4}. */ |
| 73 | /*[deutsch] Donnerstag mit dem numerischen ISO-Wert {@code 4}. */ |
| 74 | THURSDAY, |
| 75 | |
| 76 | /** Friday with the numerical ISO-value {@code 5}. */ |
| 77 | /*[deutsch] Freitag mit dem numerischen ISO-Wert {@code 5}. */ |
| 78 | FRIDAY, |
| 79 | |
| 80 | /** Saturday with the numerical ISO-value {@code 6}. */ |
| 81 | /*[deutsch] Samstag mit dem numerischen ISO-Wert {@code 6}. */ |
| 82 | SATURDAY, |
| 83 | |
| 84 | /** Sunday with the numerical ISO-value {@code 7}. */ |
| 85 | /*[deutsch] Sonntag mit dem numerischen ISO-Wert {@code 7}. */ |
| 86 | SUNDAY; |
| 87 | |
| 88 | private static final Weekday[] ENUMS = Weekday.values(); // Cache |
| 89 | |
| 90 | //~ Methoden ---------------------------------------------------------- |
| 91 | |
| 92 | /** |
| 93 | * <p>Gets the corresponding numerical ISO-value. </p> |
| 94 | * |
| 95 | * @return {@code monday=1, tuesday=2, wednesday=3, thursday=4, friday=5, saturday=6, sunday=7} |
| 96 | * @see #valueOf(int) |
| 97 | * @see Weekmodel#ISO |
| 98 | */ |
| 99 | /*[deutsch] |
| 100 | * <p>Liefert den korrespondierenden kalendarischen Integer-Wert |
| 101 | * entsprechend der ISO-8601-Norm. </p> |
| 102 | * |
| 103 | * @return {@code monday=1, tuesday=2, wednesday=3, thursday=4, friday=5, saturday=6, sunday=7} |
| 104 | * @see #valueOf(int) |
| 105 | * @see Weekmodel#ISO |
| 106 | */ |
| 107 | public int getValue() { |
| 108 | |
| 109 | return (this.ordinal() + 1); |
| 110 | |
| 111 | } |
| 112 | |