MCPcopy Create free account
hub / github.com/MenoData/Time4J / EnumElement

Class EnumElement

base/src/main/java/net/time4j/EnumElement.java:50–325  ·  view source on GitHub ↗

Allgemeines verstellbares chronologisches Element auf enum-Basis. @param generic enum type of element values @author Meno Hochschild

Source from the content-addressed store, hash-verified

48 * @author Meno Hochschild
49 */
50final class EnumElement<V extends Enum<V>>
51 extends AbstractDateElement<V>
52 implements NavigableElement<V>, NumericalElement<V>, GregorianTextElement<V> {
53
54 //~ Statische Felder/Initialisierungen --------------------------------
55
56 /** Element-Index. */
57 static final int MONTH = 101;
58 /** Element-Index. */
59 static final int DAY_OF_WEEK = 102;
60 /** Element-Index. */
61 static final int QUARTER_OF_YEAR = 103;
62
63 private static final long serialVersionUID = 2055272540517425102L;
64
65 //~ Instanzvariablen --------------------------------------------------
66
67 private transient final Class<V> type;
68 private transient final V dmin;
69 private transient final V dmax;
70 private transient final int index;
71 private transient final char symbol;
72
73 //~ Konstruktoren -----------------------------------------------------
74
75 /**
76 * <p>Konstruiert ein neues Element mit den angegebenen Details. </p>
77 *
78 * @param name name of element
79 * @param type reified type of element values
80 * @param defaultMin default minimum
81 * @param defaultMax default maximum
82 * @param index element index
83 * @param symbol CLDR-symbol used in format patterns
84 */
85 EnumElement(
86 String name,
87 Class<V> type,
88 V defaultMin,
89 V defaultMax,
90 int index,
91 char symbol
92 ) {
93 super(name);
94
95 this.type = type;
96 this.dmin = defaultMin;
97 this.dmax = defaultMax;
98 this.index = index;
99 this.symbol = symbol;
100
101 }
102
103 //~ Methoden ----------------------------------------------------------
104
105 @Override
106 public Class<V> getType() {
107

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected