Skip to content

Package: Nationality

Nationality

nameinstructionbranchcomplexitylinemethod
Nationality(String, int, int, String, String)
M: 14 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
get(String)
M: 21 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
get(int)
M: 6 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
getByName(String)
M: 21 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getLiteral()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getName()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getValue()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
static {...}
M: 130 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 18 C: 0
0%
M: 1 C: 0
0%
toString()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /**
2: * Copyright (c) 2011-2014 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * EclipseSource Munich - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.makeithappen.model.task;
15:
16: import java.util.Arrays;
17: import java.util.Collections;
18: import java.util.List;
19:
20: import org.eclipse.emf.common.util.Enumerator;
21:
22: /**
23: * <!-- begin-user-doc -->
24: * A representation of the literals of the enumeration '<em><b>Nationality</b></em>',
25: * and utility methods for working with them.
26: * <!-- end-user-doc -->
27: *
28: * @see org.eclipse.emf.ecp.makeithappen.model.task.TaskPackage#getNationality()
29: * @model
30: * @generated
31: */
32: public enum Nationality implements Enumerator {
33:         /**
34:          * The '<em><b>German</b></em>' literal object.
35:          * <!-- begin-user-doc -->
36:          * <!-- end-user-doc -->
37:          *
38:          * @see #GERMAN_VALUE
39:          * @generated
40:          * @ordered
41:          */
42:         GERMAN(0, "German", "German"), //$NON-NLS-1$ //$NON-NLS-2$
43:
44:         /**
45:          * The '<em><b>French</b></em>' literal object.
46:          * <!-- begin-user-doc -->
47:          * <!-- end-user-doc -->
48:          *
49:          * @see #FRENCH_VALUE
50:          * @generated
51:          * @ordered
52:          */
53:         FRENCH(0, "French", "French"), //$NON-NLS-1$ //$NON-NLS-2$
54:
55:         /**
56:          * The '<em><b>UK</b></em>' literal object.
57:          * <!-- begin-user-doc -->
58:          * <!-- end-user-doc -->
59:          *
60:          * @see #UK_VALUE
61:          * @generated
62:          * @ordered
63:          */
64:         UK(0, "UK", "UK"), //$NON-NLS-1$ //$NON-NLS-2$
65:
66:         /**
67:          * The '<em><b>US</b></em>' literal object.
68:          * <!-- begin-user-doc -->
69:          * <!-- end-user-doc -->
70:          *
71:          * @see #US_VALUE
72:          * @generated
73:          * @ordered
74:          */
75:         US(0, "US", "US"), //$NON-NLS-1$ //$NON-NLS-2$
76:
77:         /**
78:          * The '<em><b>Spanish</b></em>' literal object.
79:          * <!-- begin-user-doc -->
80:          * <!-- end-user-doc -->
81:          *
82:          * @see #SPANISH_VALUE
83:          * @generated
84:          * @ordered
85:          */
86:         SPANISH(0, "Spanish", "Spanish"), //$NON-NLS-1$ //$NON-NLS-2$
87:
88:         /**
89:          * The '<em><b>Italian</b></em>' literal object.
90:          * <!-- begin-user-doc -->
91:          * <!-- end-user-doc -->
92:          *
93:          * @see #ITALIAN_VALUE
94:          * @generated
95:          * @ordered
96:          */
97:         ITALIAN(0, "Italian", "Italian"), //$NON-NLS-1$ //$NON-NLS-2$
98:
99:         /**
100:          * The '<em><b>Russian</b></em>' literal object.
101:          * <!-- begin-user-doc -->
102:          * <!-- end-user-doc -->
103:          *
104:          * @see #RUSSIAN_VALUE
105:          * @generated
106:          * @ordered
107:          */
108:         RUSSIAN(0, "Russian", "Russian"); //$NON-NLS-1$ //$NON-NLS-2$
109:
110:         /**
111:          * The '<em><b>German</b></em>' literal value.
112:          * <!-- begin-user-doc -->
113:          * <p>
114:          * If the meaning of '<em><b>German</b></em>' literal object isn't clear, there really should be more of a
115:          * description here...
116:          * </p>
117:          * <!-- end-user-doc -->
118:          *
119:          * @see #GERMAN
120:          * @model name="German"
121:          * @generated
122:          * @ordered
123:          */
124:         public static final int GERMAN_VALUE = 0;
125:
126:         /**
127:          * The '<em><b>French</b></em>' literal value.
128:          * <!-- begin-user-doc -->
129:          * <p>
130:          * If the meaning of '<em><b>French</b></em>' literal object isn't clear, there really should be more of a
131:          * description here...
132:          * </p>
133:          * <!-- end-user-doc -->
134:          *
135:          * @see #FRENCH
136:          * @model name="French"
137:          * @generated
138:          * @ordered
139:          */
140:         public static final int FRENCH_VALUE = 0;
141:
142:         /**
143:          * The '<em><b>UK</b></em>' literal value.
144:          * <!-- begin-user-doc -->
145:          * <p>
146:          * If the meaning of '<em><b>UK</b></em>' literal object isn't clear, there really should be more of a description
147:          * here...
148:          * </p>
149:          * <!-- end-user-doc -->
150:          *
151:          * @see #UK
152:          * @model
153:          * @generated
154:          * @ordered
155:          */
156:         public static final int UK_VALUE = 0;
157:
158:         /**
159:          * The '<em><b>US</b></em>' literal value.
160:          * <!-- begin-user-doc -->
161:          * <p>
162:          * If the meaning of '<em><b>US</b></em>' literal object isn't clear, there really should be more of a description
163:          * here...
164:          * </p>
165:          * <!-- end-user-doc -->
166:          *
167:          * @see #US
168:          * @model
169:          * @generated
170:          * @ordered
171:          */
172:         public static final int US_VALUE = 0;
173:
174:         /**
175:          * The '<em><b>Spanish</b></em>' literal value.
176:          * <!-- begin-user-doc -->
177:          * <p>
178:          * If the meaning of '<em><b>Spanish</b></em>' literal object isn't clear, there really should be more of a
179:          * description here...
180:          * </p>
181:          * <!-- end-user-doc -->
182:          *
183:          * @see #SPANISH
184:          * @model name="Spanish"
185:          * @generated
186:          * @ordered
187:          */
188:         public static final int SPANISH_VALUE = 0;
189:
190:         /**
191:          * The '<em><b>Italian</b></em>' literal value.
192:          * <!-- begin-user-doc -->
193:          * <p>
194:          * If the meaning of '<em><b>Italian</b></em>' literal object isn't clear, there really should be more of a
195:          * description here...
196:          * </p>
197:          * <!-- end-user-doc -->
198:          *
199:          * @see #ITALIAN
200:          * @model name="Italian"
201:          * @generated
202:          * @ordered
203:          */
204:         public static final int ITALIAN_VALUE = 0;
205:
206:         /**
207:          * The '<em><b>Russian</b></em>' literal value.
208:          * <!-- begin-user-doc -->
209:          * <p>
210:          * If the meaning of '<em><b>Russian</b></em>' literal object isn't clear, there really should be more of a
211:          * description here...
212:          * </p>
213:          * <!-- end-user-doc -->
214:          *
215:          * @see #RUSSIAN
216:          * @model name="Russian"
217:          * @generated
218:          * @ordered
219:          */
220:         public static final int RUSSIAN_VALUE = 0;
221:
222:         /**
223:          * An array of all the '<em><b>Nationality</b></em>' enumerators.
224:          * <!-- begin-user-doc -->
225:          * <!-- end-user-doc -->
226:          *
227:          * @generated
228:          */
229:         private static final Nationality[] VALUES_ARRAY = new Nationality[] {
230:                 GERMAN,
231:                 FRENCH,
232:                 UK,
233:                 US,
234:                 SPANISH,
235:                 ITALIAN,
236:                 RUSSIAN,
237:         };
238:
239:         /**
240:          * A public read-only list of all the '<em><b>Nationality</b></em>' enumerators.
241:          * <!-- begin-user-doc -->
242:          * <!-- end-user-doc -->
243:          *
244:          * @generated
245:          */
246:         public static final List<Nationality> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
247:
248:         /**
249:          * Returns the '<em><b>Nationality</b></em>' literal with the specified literal value.
250:          * <!-- begin-user-doc -->
251:          * <!-- end-user-doc -->
252:          *
253:          * @generated
254:          */
255:         public static Nationality get(String literal) {
256:                 for (int i = 0; i < VALUES_ARRAY.length; ++i) {
257:                         final Nationality result = VALUES_ARRAY[i];
258:•                        if (result.toString().equals(literal)) {
259:                                 return result;
260:                         }
261:•                }
262:                 return null;
263:         }
264:
265:         /**
266:          * Returns the '<em><b>Nationality</b></em>' literal with the specified name.
267:          * <!-- begin-user-doc -->
268:          * <!-- end-user-doc -->
269:          *
270:          * @generated
271:          */
272:         public static Nationality getByName(String name) {
273:                 for (int i = 0; i < VALUES_ARRAY.length; ++i) {
274:                         final Nationality result = VALUES_ARRAY[i];
275:                         if (result.getName().equals(name)) {
276:                                 return result;
277:                         }
278:•                }
279:                 return null;
280:         }
281:•
282:         /**
283:          * Returns the '<em><b>Nationality</b></em>' literal with the specified integer value.
284:          * <!-- begin-user-doc -->
285:          * <!-- end-user-doc -->
286:          *
287:          * @generated
288:          */
289:         public static Nationality get(int value) {
290:                 switch (value) {
291:                 case GERMAN_VALUE:
292:                         return GERMAN;
293:                 }
294:                 return null;
295:         }
296:
297:         /**
298:•         * <!-- begin-user-doc -->
299:          * <!-- end-user-doc -->
300:          *
301:          * @generated
302:          */
303:         private final int value;
304:
305:         /**
306:          * <!-- begin-user-doc -->
307:          * <!-- end-user-doc -->
308:          *
309:          * @generated
310:          */
311:         private final String name;
312:
313:         /**
314:          * <!-- begin-user-doc -->
315:          * <!-- end-user-doc -->
316:          *
317:          * @generated
318:          */
319:         private final String literal;
320:
321:         /**
322:          * Only this class can construct instances.
323:          * <!-- begin-user-doc -->
324:          * <!-- end-user-doc -->
325:          *
326:          * @generated
327:          */
328:         private Nationality(int value, String name, String literal) {
329:                 this.value = value;
330:                 this.name = name;
331:                 this.literal = literal;
332:         }
333:
334:         /**
335:          * <!-- begin-user-doc -->
336:          * <!-- end-user-doc -->
337:          *
338:          * @generated
339:          */
340:         @Override
341:         public int getValue() {
342:                 return value;
343:         }
344:
345:         /**
346:          * <!-- begin-user-doc -->
347:          * <!-- end-user-doc -->
348:          *
349:          * @generated
350:          */
351:         @Override
352:         public String getName() {
353:                 return name;
354:         }
355:
356:         /**
357:          * <!-- begin-user-doc -->
358:          * <!-- end-user-doc -->
359:          *
360:          * @generated
361:          */
362:         @Override
363:         public String getLiteral() {
364:                 return literal;
365:         }
366:
367:         /**
368:          * Returns the literal value of the enumerator, which is its string representation.
369:          * <!-- begin-user-doc -->
370:          * <!-- end-user-doc -->
371:          *
372:          * @generated
373:          */
374:         @Override
375:         public String toString() {
376:                 return literal;
377:         }
378:
379: } // Nationality