1 | /** |
---|
2 | * <copyright> |
---|
3 | * </copyright> |
---|
4 | * |
---|
5 | * $Id$ |
---|
6 | */ |
---|
7 | package org.modelica.uml.sysml; |
---|
8 | |
---|
9 | import java.util.Arrays; |
---|
10 | import java.util.Collections; |
---|
11 | import java.util.List; |
---|
12 | |
---|
13 | import org.eclipse.emf.common.util.AbstractEnumerator; |
---|
14 | |
---|
15 | /** |
---|
16 | * <!-- begin-user-doc --> |
---|
17 | * A representation of the literals of the enumeration '<em><b>Variability Kind</b></em>', |
---|
18 | * and utility methods for working with them. |
---|
19 | * <!-- end-user-doc --> |
---|
20 | * @see org.modelica.uml.sysml.SysmlPackage#getVariabilityKind() |
---|
21 | * @model |
---|
22 | * @generated |
---|
23 | */ |
---|
24 | public final class VariabilityKind extends AbstractEnumerator { |
---|
25 | /** |
---|
26 | * The '<em><b>None</b></em>' literal value. |
---|
27 | * <!-- begin-user-doc --> |
---|
28 | * <p> |
---|
29 | * If the meaning of '<em><b>None</b></em>' literal object isn't clear, |
---|
30 | * there really should be more of a description here... |
---|
31 | * </p> |
---|
32 | * <!-- end-user-doc --> |
---|
33 | * @see #NONE_LITERAL |
---|
34 | * @model name="none" |
---|
35 | * @generated |
---|
36 | * @ordered |
---|
37 | */ |
---|
38 | public static final int NONE = 0; |
---|
39 | |
---|
40 | /** |
---|
41 | * The '<em><b>Constant</b></em>' literal value. |
---|
42 | * <!-- begin-user-doc --> |
---|
43 | * <p> |
---|
44 | * If the meaning of '<em><b>Constant</b></em>' literal object isn't clear, |
---|
45 | * there really should be more of a description here... |
---|
46 | * </p> |
---|
47 | * <!-- end-user-doc --> |
---|
48 | * @see #CONSTANT_LITERAL |
---|
49 | * @model name="constant" |
---|
50 | * @generated |
---|
51 | * @ordered |
---|
52 | */ |
---|
53 | public static final int CONSTANT = 2; |
---|
54 | |
---|
55 | /** |
---|
56 | * The '<em><b>Discrete</b></em>' literal value. |
---|
57 | * <!-- begin-user-doc --> |
---|
58 | * <p> |
---|
59 | * If the meaning of '<em><b>Discrete</b></em>' literal object isn't clear, |
---|
60 | * there really should be more of a description here... |
---|
61 | * </p> |
---|
62 | * <!-- end-user-doc --> |
---|
63 | * @see #DISCRETE_LITERAL |
---|
64 | * @model name="discrete" |
---|
65 | * @generated |
---|
66 | * @ordered |
---|
67 | */ |
---|
68 | public static final int DISCRETE = 3; |
---|
69 | |
---|
70 | /** |
---|
71 | * The '<em><b>None</b></em>' literal object. |
---|
72 | * <!-- begin-user-doc --> |
---|
73 | * <!-- end-user-doc --> |
---|
74 | * @see #NONE |
---|
75 | * @generated |
---|
76 | * @ordered |
---|
77 | */ |
---|
78 | public static final VariabilityKind NONE_LITERAL = new VariabilityKind(NONE, "none", "none"); |
---|
79 | |
---|
80 | /** |
---|
81 | * The '<em><b>Constant</b></em>' literal object. |
---|
82 | * <!-- begin-user-doc --> |
---|
83 | * <!-- end-user-doc --> |
---|
84 | * @see #CONSTANT |
---|
85 | * @generated |
---|
86 | * @ordered |
---|
87 | */ |
---|
88 | public static final VariabilityKind CONSTANT_LITERAL = new VariabilityKind(CONSTANT, "constant", "constant"); |
---|
89 | |
---|
90 | /** |
---|
91 | * The '<em><b>Discrete</b></em>' literal object. |
---|
92 | * <!-- begin-user-doc --> |
---|
93 | * <!-- end-user-doc --> |
---|
94 | * @see #DISCRETE |
---|
95 | * @generated |
---|
96 | * @ordered |
---|
97 | */ |
---|
98 | public static final VariabilityKind DISCRETE_LITERAL = new VariabilityKind(DISCRETE, "discrete", "discrete"); |
---|
99 | |
---|
100 | /** |
---|
101 | * An array of all the '<em><b>Variability Kind</b></em>' enumerators. |
---|
102 | * <!-- begin-user-doc --> |
---|
103 | * <!-- end-user-doc --> |
---|
104 | * @generated |
---|
105 | */ |
---|
106 | private static final VariabilityKind[] VALUES_ARRAY = |
---|
107 | new VariabilityKind[] { |
---|
108 | NONE_LITERAL, |
---|
109 | CONSTANT_LITERAL, |
---|
110 | DISCRETE_LITERAL, |
---|
111 | }; |
---|
112 | |
---|
113 | /** |
---|
114 | * A public read-only list of all the '<em><b>Variability Kind</b></em>' enumerators. |
---|
115 | * <!-- begin-user-doc --> |
---|
116 | * <!-- end-user-doc --> |
---|
117 | * @generated |
---|
118 | */ |
---|
119 | public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
---|
120 | |
---|
121 | /** |
---|
122 | * Returns the '<em><b>Variability Kind</b></em>' literal with the specified literal value. |
---|
123 | * <!-- begin-user-doc --> |
---|
124 | * <!-- end-user-doc --> |
---|
125 | * @generated |
---|
126 | */ |
---|
127 | public static VariabilityKind get(String literal) { |
---|
128 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
---|
129 | VariabilityKind result = VALUES_ARRAY[i]; |
---|
130 | if (result.toString().equals(literal)) { |
---|
131 | return result; |
---|
132 | } |
---|
133 | } |
---|
134 | return null; |
---|
135 | } |
---|
136 | |
---|
137 | /** |
---|
138 | * Returns the '<em><b>Variability Kind</b></em>' literal with the specified name. |
---|
139 | * <!-- begin-user-doc --> |
---|
140 | * <!-- end-user-doc --> |
---|
141 | * @generated |
---|
142 | */ |
---|
143 | public static VariabilityKind getByName(String name) { |
---|
144 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
---|
145 | VariabilityKind result = VALUES_ARRAY[i]; |
---|
146 | if (result.getName().equals(name)) { |
---|
147 | return result; |
---|
148 | } |
---|
149 | } |
---|
150 | return null; |
---|
151 | } |
---|
152 | |
---|
153 | /** |
---|
154 | * Returns the '<em><b>Variability Kind</b></em>' literal with the specified integer value. |
---|
155 | * <!-- begin-user-doc --> |
---|
156 | * <!-- end-user-doc --> |
---|
157 | * @generated |
---|
158 | */ |
---|
159 | public static VariabilityKind get(int value) { |
---|
160 | switch (value) { |
---|
161 | case NONE: return NONE_LITERAL; |
---|
162 | case CONSTANT: return CONSTANT_LITERAL; |
---|
163 | case DISCRETE: return DISCRETE_LITERAL; |
---|
164 | } |
---|
165 | return null; |
---|
166 | } |
---|
167 | |
---|
168 | /** |
---|
169 | * Only this class can construct instances. |
---|
170 | * <!-- begin-user-doc --> |
---|
171 | * <!-- end-user-doc --> |
---|
172 | * @generated |
---|
173 | */ |
---|
174 | private VariabilityKind(int value, String name, String literal) { |
---|
175 | super(value, name, literal); |
---|
176 | } |
---|
177 | |
---|
178 | } //VariabilityKind |
---|