1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package LqnCore; |
8 | |
9 | import java.util.Arrays; |
10 | import java.util.Collections; |
11 | import java.util.List; |
12 | |
13 | import org.eclipse.emf.common.util.Enumerator; |
14 | |
15 | /** |
16 | * <!-- begin-user-doc --> |
17 | * A representation of the literals of the enumeration '<em><b>Type Type</b></em>', |
18 | * and utility methods for working with them. |
19 | * <!-- end-user-doc --> |
20 | * @see LqnCore.LqnCorePackage#getTypeType() |
21 | * @model extendedMetaData="name='type_._type'" |
22 | * @generated |
23 | */ |
24 | public enum TypeType implements Enumerator { |
25 | /** |
26 | * The '<em><b>PH1PH2</b></em>' literal object. |
27 | * <!-- begin-user-doc --> |
28 | * <!-- end-user-doc --> |
29 | * @see #PH1PH2_VALUE |
30 | * @generated |
31 | * @ordered |
32 | */ |
33 | PH1PH2(0, "PH1PH2", "PH1PH2"), |
34 | |
35 | /** |
36 | * The '<em><b>GRAPH</b></em>' literal object. |
37 | * <!-- begin-user-doc --> |
38 | * <!-- end-user-doc --> |
39 | * @see #GRAPH_VALUE |
40 | * @generated |
41 | * @ordered |
42 | */ |
43 | GRAPH(1, "GRAPH", "GRAPH"), |
44 | |
45 | /** |
46 | * The '<em><b>NONE</b></em>' literal object. |
47 | * <!-- begin-user-doc --> |
48 | * <!-- end-user-doc --> |
49 | * @see #NONE_VALUE |
50 | * @generated |
51 | * @ordered |
52 | */ |
53 | NONE(2, "NONE", "NONE"); |
54 | |
55 | /** |
56 | * The '<em><b>PH1PH2</b></em>' literal value. |
57 | * <!-- begin-user-doc --> |
58 | * <p> |
59 | * If the meaning of '<em><b>PH1PH2</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 #PH1PH2 |
64 | * @model |
65 | * @generated |
66 | * @ordered |
67 | */ |
68 | public static final int PH1PH2_VALUE = 0; |
69 | |
70 | /** |
71 | * The '<em><b>GRAPH</b></em>' literal value. |
72 | * <!-- begin-user-doc --> |
73 | * <p> |
74 | * If the meaning of '<em><b>GRAPH</b></em>' literal object isn't clear, |
75 | * there really should be more of a description here... |
76 | * </p> |
77 | * <!-- end-user-doc --> |
78 | * @see #GRAPH |
79 | * @model |
80 | * @generated |
81 | * @ordered |
82 | */ |
83 | public static final int GRAPH_VALUE = 1; |
84 | |
85 | /** |
86 | * The '<em><b>NONE</b></em>' literal value. |
87 | * <!-- begin-user-doc --> |
88 | * <p> |
89 | * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear, |
90 | * there really should be more of a description here... |
91 | * </p> |
92 | * <!-- end-user-doc --> |
93 | * @see #NONE |
94 | * @model |
95 | * @generated |
96 | * @ordered |
97 | */ |
98 | public static final int NONE_VALUE = 2; |
99 | |
100 | /** |
101 | * An array of all the '<em><b>Type Type</b></em>' enumerators. |
102 | * <!-- begin-user-doc --> |
103 | * <!-- end-user-doc --> |
104 | * @generated |
105 | */ |
106 | private static final TypeType[] VALUES_ARRAY = |
107 | new TypeType[] { |
108 | PH1PH2, |
109 | GRAPH, |
110 | NONE, |
111 | }; |
112 | |
113 | /** |
114 | * A public read-only list of all the '<em><b>Type Type</b></em>' enumerators. |
115 | * <!-- begin-user-doc --> |
116 | * <!-- end-user-doc --> |
117 | * @generated |
118 | */ |
119 | public static final List<TypeType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
120 | |
121 | /** |
122 | * Returns the '<em><b>Type Type</b></em>' literal with the specified literal value. |
123 | * <!-- begin-user-doc --> |
124 | * <!-- end-user-doc --> |
125 | * @generated |
126 | */ |
127 | public static TypeType get(String literal) { |
128 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
129 | TypeType 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>Type Type</b></em>' literal with the specified name. |
139 | * <!-- begin-user-doc --> |
140 | * <!-- end-user-doc --> |
141 | * @generated |
142 | */ |
143 | public static TypeType getByName(String name) { |
144 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
145 | TypeType 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>Type Type</b></em>' literal with the specified integer value. |
155 | * <!-- begin-user-doc --> |
156 | * <!-- end-user-doc --> |
157 | * @generated |
158 | */ |
159 | public static TypeType get(int value) { |
160 | switch (value) { |
161 | case PH1PH2_VALUE: return PH1PH2; |
162 | case GRAPH_VALUE: return GRAPH; |
163 | case NONE_VALUE: return NONE; |
164 | } |
165 | return null; |
166 | } |
167 | |
168 | /** |
169 | * <!-- begin-user-doc --> |
170 | * <!-- end-user-doc --> |
171 | * @generated |
172 | */ |
173 | private final int value; |
174 | |
175 | /** |
176 | * <!-- begin-user-doc --> |
177 | * <!-- end-user-doc --> |
178 | * @generated |
179 | */ |
180 | private final String name; |
181 | |
182 | /** |
183 | * <!-- begin-user-doc --> |
184 | * <!-- end-user-doc --> |
185 | * @generated |
186 | */ |
187 | private final String literal; |
188 | |
189 | /** |
190 | * Only this class can construct instances. |
191 | * <!-- begin-user-doc --> |
192 | * <!-- end-user-doc --> |
193 | * @generated |
194 | */ |
195 | private TypeType(int value, String name, String literal) { |
196 | this.value = value; |
197 | this.name = name; |
198 | this.literal = literal; |
199 | } |
200 | |
201 | /** |
202 | * <!-- begin-user-doc --> |
203 | * <!-- end-user-doc --> |
204 | * @generated |
205 | */ |
206 | public int getValue() { |
207 | return value; |
208 | } |
209 | |
210 | /** |
211 | * <!-- begin-user-doc --> |
212 | * <!-- end-user-doc --> |
213 | * @generated |
214 | */ |
215 | public String getName() { |
216 | return name; |
217 | } |
218 | |
219 | /** |
220 | * <!-- begin-user-doc --> |
221 | * <!-- end-user-doc --> |
222 | * @generated |
223 | */ |
224 | public String getLiteral() { |
225 | return literal; |
226 | } |
227 | |
228 | /** |
229 | * Returns the literal value of the enumerator, which is its string representation. |
230 | * <!-- begin-user-doc --> |
231 | * <!-- end-user-doc --> |
232 | * @generated |
233 | */ |
234 | @Override |
235 | public String toString() { |
236 | return literal; |
237 | } |
238 | |
239 | } //TypeType |