1 /*
2 * Copyright (C) 2023 Dipl.-Inform. Kai Hofmann. All rights reserved!
3 */
4 package de.powerstat.validation.values;
5
6
7 import de.powerstat.validation.interfaces.IValueObject;
8
9
10 /**
11 * Supported calendar systems.
12 *
13 * Not DSGVO relevant.
14 */
15 public enum CalendarSystems implements IValueObject
16 {
17 /**
18 * Julian calendar system.
19 */
20 JULIAN(0),
21
22 /**
23 * Gregorian calendar system.
24 */
25 GREGORIAN(1);
26
27 // ISLAMIC(2)
28 // JEWISH(3)
29 // INDIAN(4)
30 // CHINESE(5)
31
32
33 /**
34 * Action number.
35 */
36 private final int action;
37
38
39 /**
40 * Ordinal constructor.
41 *
42 * @param action Action number
43 */
44 CalendarSystems(final int action)
45 {
46 this.action = action;
47 }
48
49
50 /**
51 * CalendarSystems factory.
52 *
53 * @param value CalendarSystems enum string
54 * @return CalendarSystems enum
55 */
56 public static CalendarSystems of(final String value)
57 {
58 return CalendarSystems.valueOf(value);
59 }
60
61
62 /**
63 * Get action number.
64 *
65 * @return Action number
66 */
67 public int getAction()
68 {
69 return this.action;
70 }
71
72
73 /**
74 * Returns the value of this CalendarSystems as a string.
75 *
76 * @return The text value represented by this object after conversion to type string.
77 */
78 @Override
79 public String stringValue()
80 {
81 return this.name();
82 }
83
84 }