Skip to content

Package: VLabelStyle

VLabelStyle

nameinstructionbranchcomplexitylinemethod
VLabelStyle(String, int, int, String, String)
M: 0 C: 14
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%
get(String)
M: 3 C: 18
86%
M: 2 C: 2
50%
M: 2 C: 1
33%
M: 1 C: 4
80%
M: 0 C: 1
100%
get(int)
M: 26 C: 0
0%
M: 12 C: 0
0%
M: 12 C: 0
0%
M: 13 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: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getName()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
getValue()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
static {...}
M: 0 C: 198
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 25
100%
M: 0 C: 1
100%
toString()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%

Coverage

1: /**
2: * Copyright (c) 2011-2013 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: * Eugen Neufeld - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.label.model;
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>Style</b></em>',
25: * and utility methods for working with them.
26: * <!-- end-user-doc -->
27: *
28: * @see org.eclipse.emf.ecp.view.spi.label.model.VLabelPackage#getVLabelStyle()
29: * @model
30: * @generated
31: */
32: public enum VLabelStyle implements Enumerator {
33:         /**
34:          * The '<em><b>H0</b></em>' literal object.
35:          * <!-- begin-user-doc -->
36:          * <!-- end-user-doc -->
37:          *
38:          * @see #H0_VALUE
39:          * @generated
40:          * @ordered
41:          */
42:         H0(0, "H0", "H0"), //$NON-NLS-1$ //$NON-NLS-2$
43:
44:         /**
45:          * The '<em><b>H1</b></em>' literal object.
46:          * <!-- begin-user-doc -->
47:          * <!-- end-user-doc -->
48:          *
49:          * @see #H1_VALUE
50:          * @generated
51:          * @ordered
52:          */
53:         H1(1, "H1", "H1"), //$NON-NLS-1$ //$NON-NLS-2$
54:
55:         /**
56:          * The '<em><b>H2</b></em>' literal object.
57:          * <!-- begin-user-doc -->
58:          * <!-- end-user-doc -->
59:          *
60:          * @see #H2_VALUE
61:          * @generated
62:          * @ordered
63:          */
64:         H2(2, "H2", "H2"), //$NON-NLS-1$ //$NON-NLS-2$
65:
66:         /**
67:          * The '<em><b>H3</b></em>' literal object.
68:          * <!-- begin-user-doc -->
69:          * <!-- end-user-doc -->
70:          *
71:          * @see #H3_VALUE
72:          * @generated
73:          * @ordered
74:          */
75:         H3(3, "H3", "H3"), //$NON-NLS-1$ //$NON-NLS-2$
76:
77:         /**
78:          * The '<em><b>H4</b></em>' literal object.
79:          * <!-- begin-user-doc -->
80:          * <!-- end-user-doc -->
81:          *
82:          * @see #H4_VALUE
83:          * @generated
84:          * @ordered
85:          */
86:         H4(4, "H4", "H4"), //$NON-NLS-1$ //$NON-NLS-2$
87:
88:         /**
89:          * The '<em><b>H5</b></em>' literal object.
90:          * <!-- begin-user-doc -->
91:          * <!-- end-user-doc -->
92:          *
93:          * @see #H5_VALUE
94:          * @generated
95:          * @ordered
96:          */
97:         H5(5, "H5", "H5"), //$NON-NLS-1$ //$NON-NLS-2$
98:
99:         /**
100:          * The '<em><b>H6</b></em>' literal object.
101:          * <!-- begin-user-doc -->
102:          * <!-- end-user-doc -->
103:          *
104:          * @see #H6_VALUE
105:          * @generated
106:          * @ordered
107:          */
108:         H6(6, "H6", "H6"), //$NON-NLS-1$ //$NON-NLS-2$
109:
110:         /**
111:          * The '<em><b>H7</b></em>' literal object.
112:          * <!-- begin-user-doc -->
113:          * <!-- end-user-doc -->
114:          *
115:          * @see #H7_VALUE
116:          * @generated
117:          * @ordered
118:          */
119:         H7(7, "H7", "H7"), //$NON-NLS-1$ //$NON-NLS-2$
120:
121:         /**
122:          * The '<em><b>H8</b></em>' literal object.
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @see #H8_VALUE
127:          * @generated
128:          * @ordered
129:          */
130:         H8(8, "H8", "H8"), //$NON-NLS-1$ //$NON-NLS-2$
131:
132:         /**
133:          * The '<em><b>H9</b></em>' literal object.
134:          * <!-- begin-user-doc -->
135:          * <!-- end-user-doc -->
136:          *
137:          * @see #H9_VALUE
138:          * @generated
139:          * @ordered
140:          */
141:         H9(9, "H9", "H9"), //$NON-NLS-1$ //$NON-NLS-2$
142:
143:         /**
144:          * The '<em><b>Separator</b></em>' literal object.
145:          * <!-- begin-user-doc -->
146:          * <!-- end-user-doc -->
147:          *
148:          * @see #SEPARATOR_VALUE
149:          * @generated
150:          * @ordered
151:          */
152:         SEPARATOR(10, "Separator", "Separator"); //$NON-NLS-1$ //$NON-NLS-2$
153:
154:         /**
155:          * The '<em><b>H0</b></em>' literal value.
156:          * <!-- begin-user-doc -->
157:          * <p>
158:          * If the meaning of '<em><b>H0</b></em>' literal object isn't clear, there really should be more of a description
159:          * here...
160:          * </p>
161:          * <!-- end-user-doc -->
162:          *
163:          * @see #H0
164:          * @model
165:          * @generated
166:          * @ordered
167:          */
168:         public static final int H0_VALUE = 0;
169:
170:         /**
171:          * The '<em><b>H1</b></em>' literal value.
172:          * <!-- begin-user-doc -->
173:          * <p>
174:          * If the meaning of '<em><b>H1</b></em>' literal object isn't clear, there really should be more of a description
175:          * here...
176:          * </p>
177:          * <!-- end-user-doc -->
178:          *
179:          * @see #H1
180:          * @model
181:          * @generated
182:          * @ordered
183:          */
184:         public static final int H1_VALUE = 1;
185:
186:         /**
187:          * The '<em><b>H2</b></em>' literal value.
188:          * <!-- begin-user-doc -->
189:          * <p>
190:          * If the meaning of '<em><b>H2</b></em>' literal object isn't clear, there really should be more of a description
191:          * here...
192:          * </p>
193:          * <!-- end-user-doc -->
194:          *
195:          * @see #H2
196:          * @model
197:          * @generated
198:          * @ordered
199:          */
200:         public static final int H2_VALUE = 2;
201:
202:         /**
203:          * The '<em><b>H3</b></em>' literal value.
204:          * <!-- begin-user-doc -->
205:          * <p>
206:          * If the meaning of '<em><b>H3</b></em>' literal object isn't clear, there really should be more of a description
207:          * here...
208:          * </p>
209:          * <!-- end-user-doc -->
210:          *
211:          * @see #H3
212:          * @model
213:          * @generated
214:          * @ordered
215:          */
216:         public static final int H3_VALUE = 3;
217:
218:         /**
219:          * The '<em><b>H4</b></em>' literal value.
220:          * <!-- begin-user-doc -->
221:          * <p>
222:          * If the meaning of '<em><b>H4</b></em>' literal object isn't clear, there really should be more of a description
223:          * here...
224:          * </p>
225:          * <!-- end-user-doc -->
226:          *
227:          * @see #H4
228:          * @model
229:          * @generated
230:          * @ordered
231:          */
232:         public static final int H4_VALUE = 4;
233:
234:         /**
235:          * The '<em><b>H5</b></em>' literal value.
236:          * <!-- begin-user-doc -->
237:          * <p>
238:          * If the meaning of '<em><b>H5</b></em>' literal object isn't clear, there really should be more of a description
239:          * here...
240:          * </p>
241:          * <!-- end-user-doc -->
242:          *
243:          * @see #H5
244:          * @model
245:          * @generated
246:          * @ordered
247:          */
248:         public static final int H5_VALUE = 5;
249:
250:         /**
251:          * The '<em><b>H6</b></em>' literal value.
252:          * <!-- begin-user-doc -->
253:          * <p>
254:          * If the meaning of '<em><b>H6</b></em>' literal object isn't clear, there really should be more of a description
255:          * here...
256:          * </p>
257:          * <!-- end-user-doc -->
258:          *
259:          * @see #H6
260:          * @model
261:          * @generated
262:          * @ordered
263:          */
264:         public static final int H6_VALUE = 6;
265:
266:         /**
267:          * The '<em><b>H7</b></em>' literal value.
268:          * <!-- begin-user-doc -->
269:          * <p>
270:          * If the meaning of '<em><b>H7</b></em>' literal object isn't clear, there really should be more of a description
271:          * here...
272:          * </p>
273:          * <!-- end-user-doc -->
274:          *
275:          * @see #H7
276:          * @model
277:          * @generated
278:          * @ordered
279:          */
280:         public static final int H7_VALUE = 7;
281:
282:         /**
283:          * The '<em><b>H8</b></em>' literal value.
284:          * <!-- begin-user-doc -->
285:          * <p>
286:          * If the meaning of '<em><b>H8</b></em>' literal object isn't clear, there really should be more of a description
287:          * here...
288:          * </p>
289:          * <!-- end-user-doc -->
290:          *
291:          * @see #H8
292:          * @model
293:          * @generated
294:          * @ordered
295:          */
296:         public static final int H8_VALUE = 8;
297:
298:         /**
299:          * The '<em><b>H9</b></em>' literal value.
300:          * <!-- begin-user-doc -->
301:          * <p>
302:          * If the meaning of '<em><b>H9</b></em>' literal object isn't clear, there really should be more of a description
303:          * here...
304:          * </p>
305:          * <!-- end-user-doc -->
306:          *
307:          * @see #H9
308:          * @model
309:          * @generated
310:          * @ordered
311:          */
312:         public static final int H9_VALUE = 9;
313:
314:         /**
315:          * The '<em><b>Separator</b></em>' literal value.
316:          * <!-- begin-user-doc -->
317:          * <p>
318:          * If the meaning of '<em><b>Separator</b></em>' literal object isn't clear, there really should be more of a
319:          * description here...
320:          * </p>
321:          * <!-- end-user-doc -->
322:          *
323:          * @see #SEPARATOR
324:          * @model name="Separator"
325:          * @generated
326:          * @ordered
327:          */
328:         public static final int SEPARATOR_VALUE = 10;
329:
330:         /**
331:          * An array of all the '<em><b>VLabel Style</b></em>' enumerators.
332:          * <!-- begin-user-doc -->
333:          * <!-- end-user-doc -->
334:          *
335:          * @generated
336:          */
337:         private static final VLabelStyle[] VALUES_ARRAY = new VLabelStyle[] {
338:                 H0,
339:                 H1,
340:                 H2,
341:                 H3,
342:                 H4,
343:                 H5,
344:                 H6,
345:                 H7,
346:                 H8,
347:                 H9,
348:                 SEPARATOR,
349:         };
350:
351:         /**
352:          * A public read-only list of all the '<em><b>VLabel Style</b></em>' enumerators.
353:          * <!-- begin-user-doc -->
354:          * <!-- end-user-doc -->
355:          *
356:          * @generated
357:          */
358:         public static final List<VLabelStyle> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
359:
360:         /**
361:          * Returns the '<em><b>VLabel Style</b></em>' literal with the specified literal value.
362:          * <!-- begin-user-doc -->
363:          * <!-- end-user-doc -->
364:          *
365:          * @generated
366:          */
367:         public static VLabelStyle get(String literal) {
368:•                for (int i = 0; i < VALUES_ARRAY.length; ++i) {
369:                         final VLabelStyle result = VALUES_ARRAY[i];
370:•                        if (result.toString().equals(literal)) {
371:                                 return result;
372:                         }
373:                 }
374:                 return null;
375:         }
376:
377:         /**
378:          * Returns the '<em><b>VLabel Style</b></em>' literal with the specified name.
379:          * <!-- begin-user-doc -->
380:          * <!-- end-user-doc -->
381:          *
382:          * @generated
383:          */
384:         public static VLabelStyle getByName(String name) {
385:•                for (int i = 0; i < VALUES_ARRAY.length; ++i) {
386:                         final VLabelStyle result = VALUES_ARRAY[i];
387:•                        if (result.getName().equals(name)) {
388:                                 return result;
389:                         }
390:                 }
391:                 return null;
392:         }
393:
394:         /**
395:          * Returns the '<em><b>VLabel Style</b></em>' literal with the specified integer value.
396:          * <!-- begin-user-doc -->
397:          * <!-- end-user-doc -->
398:          *
399:          * @generated
400:          */
401:         public static VLabelStyle get(int value) {
402:•                switch (value) {
403:                 case H0_VALUE:
404:                         return H0;
405:                 case H1_VALUE:
406:                         return H1;
407:                 case H2_VALUE:
408:                         return H2;
409:                 case H3_VALUE:
410:                         return H3;
411:                 case H4_VALUE:
412:                         return H4;
413:                 case H5_VALUE:
414:                         return H5;
415:                 case H6_VALUE:
416:                         return H6;
417:                 case H7_VALUE:
418:                         return H7;
419:                 case H8_VALUE:
420:                         return H8;
421:                 case H9_VALUE:
422:                         return H9;
423:                 case SEPARATOR_VALUE:
424:                         return SEPARATOR;
425:                 }
426:                 return null;
427:         }
428:
429:         /**
430:          * <!-- begin-user-doc -->
431:          * <!-- end-user-doc -->
432:          *
433:          * @generated
434:          */
435:         private final int value;
436:
437:         /**
438:          * <!-- begin-user-doc -->
439:          * <!-- end-user-doc -->
440:          *
441:          * @generated
442:          */
443:         private final String name;
444:
445:         /**
446:          * <!-- begin-user-doc -->
447:          * <!-- end-user-doc -->
448:          *
449:          * @generated
450:          */
451:         private final String literal;
452:
453:         /**
454:          * Only this class can construct instances.
455:          * <!-- begin-user-doc -->
456:          * <!-- end-user-doc -->
457:          *
458:          * @generated
459:          */
460:         private VLabelStyle(int value, String name, String literal) {
461:                 this.value = value;
462:                 this.name = name;
463:                 this.literal = literal;
464:         }
465:
466:         /**
467:          * <!-- begin-user-doc -->
468:          * <!-- end-user-doc -->
469:          *
470:          * @generated
471:          */
472:         @Override
473:         public int getValue() {
474:                 return value;
475:         }
476:
477:         /**
478:          * <!-- begin-user-doc -->
479:          * <!-- end-user-doc -->
480:          *
481:          * @generated
482:          */
483:         @Override
484:         public String getName() {
485:                 return name;
486:         }
487:
488:         /**
489:          * <!-- begin-user-doc -->
490:          * <!-- end-user-doc -->
491:          *
492:          * @generated
493:          */
494:         @Override
495:         public String getLiteral() {
496:                 return literal;
497:         }
498:
499:         /**
500:          * Returns the literal value of the enumerator, which is its string representation.
501:          * <!-- begin-user-doc -->
502:          * <!-- end-user-doc -->
503:          *
504:          * @generated
505:          */
506:         @Override
507:         public String toString() {
508:                 return literal;
509:         }
510:
511: } // LabelStyle