1 | /** |
---|
2 | * <copyright> |
---|
3 | * </copyright> |
---|
4 | * |
---|
5 | * $Id$ |
---|
6 | */ |
---|
7 | package PhysicalQuantities; |
---|
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>Unit Prefixes</b></em>', |
---|
18 | * and utility methods for working with them. |
---|
19 | * <!-- end-user-doc --> |
---|
20 | * @see PhysicalQuantities.PhysicalQuantitiesPackage#getUnitPrefixes() |
---|
21 | * @model |
---|
22 | * @generated |
---|
23 | */ |
---|
24 | public enum UnitPrefixes implements Enumerator { |
---|
25 | /** |
---|
26 | * The '<em><b>NONE</b></em>' literal object. |
---|
27 | * <!-- begin-user-doc --> |
---|
28 | * <!-- end-user-doc --> |
---|
29 | * @see #NONE_VALUE |
---|
30 | * @generated |
---|
31 | * @ordered |
---|
32 | */ |
---|
33 | NONE(0, "NONE", "NONE"), |
---|
34 | |
---|
35 | /** |
---|
36 | * The '<em><b>YOTTA</b></em>' literal object. |
---|
37 | * <!-- begin-user-doc --> |
---|
38 | * <!-- end-user-doc --> |
---|
39 | * @see #YOTTA_VALUE |
---|
40 | * @generated |
---|
41 | * @ordered |
---|
42 | */ |
---|
43 | YOTTA(24, "YOTTA", "Y"), |
---|
44 | |
---|
45 | /** |
---|
46 | * The '<em><b>ZETTA</b></em>' literal object. |
---|
47 | * <!-- begin-user-doc --> |
---|
48 | * <!-- end-user-doc --> |
---|
49 | * @see #ZETTA_VALUE |
---|
50 | * @generated |
---|
51 | * @ordered |
---|
52 | */ |
---|
53 | ZETTA(21, "ZETTA", "Z"), |
---|
54 | |
---|
55 | /** |
---|
56 | * The '<em><b>EXA</b></em>' literal object. |
---|
57 | * <!-- begin-user-doc --> |
---|
58 | * <!-- end-user-doc --> |
---|
59 | * @see #EXA_VALUE |
---|
60 | * @generated |
---|
61 | * @ordered |
---|
62 | */ |
---|
63 | EXA(18, "EXA", "E"), |
---|
64 | |
---|
65 | /** |
---|
66 | * The '<em><b>PETA</b></em>' literal object. |
---|
67 | * <!-- begin-user-doc --> |
---|
68 | * <!-- end-user-doc --> |
---|
69 | * @see #PETA_VALUE |
---|
70 | * @generated |
---|
71 | * @ordered |
---|
72 | */ |
---|
73 | PETA(15, "PETA", "P"), |
---|
74 | |
---|
75 | /** |
---|
76 | * The '<em><b>TERA</b></em>' literal object. |
---|
77 | * <!-- begin-user-doc --> |
---|
78 | * <!-- end-user-doc --> |
---|
79 | * @see #TERA_VALUE |
---|
80 | * @generated |
---|
81 | * @ordered |
---|
82 | */ |
---|
83 | TERA(12, "TERA", "T"), |
---|
84 | |
---|
85 | /** |
---|
86 | * The '<em><b>GIGA</b></em>' literal object. |
---|
87 | * <!-- begin-user-doc --> |
---|
88 | * <!-- end-user-doc --> |
---|
89 | * @see #GIGA_VALUE |
---|
90 | * @generated |
---|
91 | * @ordered |
---|
92 | */ |
---|
93 | GIGA(9, "GIGA", "G"), |
---|
94 | |
---|
95 | /** |
---|
96 | * The '<em><b>MEGA</b></em>' literal object. |
---|
97 | * <!-- begin-user-doc --> |
---|
98 | * <!-- end-user-doc --> |
---|
99 | * @see #MEGA_VALUE |
---|
100 | * @generated |
---|
101 | * @ordered |
---|
102 | */ |
---|
103 | MEGA(6, "MEGA", "M"), |
---|
104 | |
---|
105 | /** |
---|
106 | * The '<em><b>KILO</b></em>' literal object. |
---|
107 | * <!-- begin-user-doc --> |
---|
108 | * <!-- end-user-doc --> |
---|
109 | * @see #KILO_VALUE |
---|
110 | * @generated |
---|
111 | * @ordered |
---|
112 | */ |
---|
113 | KILO(3, "KILO", "K"), |
---|
114 | |
---|
115 | /** |
---|
116 | * The '<em><b>HECTO</b></em>' literal object. |
---|
117 | * <!-- begin-user-doc --> |
---|
118 | * <!-- end-user-doc --> |
---|
119 | * @see #HECTO_VALUE |
---|
120 | * @generated |
---|
121 | * @ordered |
---|
122 | */ |
---|
123 | HECTO(2, "HECTO", "h"), |
---|
124 | |
---|
125 | /** |
---|
126 | * The '<em><b>DEKA</b></em>' literal object. |
---|
127 | * <!-- begin-user-doc --> |
---|
128 | * <!-- end-user-doc --> |
---|
129 | * @see #DEKA_VALUE |
---|
130 | * @generated |
---|
131 | * @ordered |
---|
132 | */ |
---|
133 | DEKA(1, "DEKA", "D"), |
---|
134 | |
---|
135 | /** |
---|
136 | * The '<em><b>DECI</b></em>' literal object. |
---|
137 | * <!-- begin-user-doc --> |
---|
138 | * <!-- end-user-doc --> |
---|
139 | * @see #DECI_VALUE |
---|
140 | * @generated |
---|
141 | * @ordered |
---|
142 | */ |
---|
143 | DECI(-1, "DECI", "d"), |
---|
144 | |
---|
145 | /** |
---|
146 | * The '<em><b>CENTI</b></em>' literal object. |
---|
147 | * <!-- begin-user-doc --> |
---|
148 | * <!-- end-user-doc --> |
---|
149 | * @see #CENTI_VALUE |
---|
150 | * @generated |
---|
151 | * @ordered |
---|
152 | */ |
---|
153 | CENTI(-2, "CENTI", "c"), |
---|
154 | |
---|
155 | /** |
---|
156 | * The '<em><b>MILLI</b></em>' literal object. |
---|
157 | * <!-- begin-user-doc --> |
---|
158 | * <!-- end-user-doc --> |
---|
159 | * @see #MILLI_VALUE |
---|
160 | * @generated |
---|
161 | * @ordered |
---|
162 | */ |
---|
163 | MILLI(-3, "MILLI", "m"), |
---|
164 | |
---|
165 | /** |
---|
166 | * The '<em><b>MICRO</b></em>' literal object. |
---|
167 | * <!-- begin-user-doc --> |
---|
168 | * <!-- end-user-doc --> |
---|
169 | * @see #MICRO_VALUE |
---|
170 | * @generated |
---|
171 | * @ordered |
---|
172 | */ |
---|
173 | MICRO(-6, "MICRO", "u"), |
---|
174 | |
---|
175 | /** |
---|
176 | * The '<em><b>NANO</b></em>' literal object. |
---|
177 | * <!-- begin-user-doc --> |
---|
178 | * <!-- end-user-doc --> |
---|
179 | * @see #NANO_VALUE |
---|
180 | * @generated |
---|
181 | * @ordered |
---|
182 | */ |
---|
183 | NANO(-9, "NANO", "n"), |
---|
184 | |
---|
185 | /** |
---|
186 | * The '<em><b>PICO</b></em>' literal object. |
---|
187 | * <!-- begin-user-doc --> |
---|
188 | * <!-- end-user-doc --> |
---|
189 | * @see #PICO_VALUE |
---|
190 | * @generated |
---|
191 | * @ordered |
---|
192 | */ |
---|
193 | PICO(-12, "PICO", "p"), |
---|
194 | |
---|
195 | /** |
---|
196 | * The '<em><b>FEMTO</b></em>' literal object. |
---|
197 | * <!-- begin-user-doc --> |
---|
198 | * <!-- end-user-doc --> |
---|
199 | * @see #FEMTO_VALUE |
---|
200 | * @generated |
---|
201 | * @ordered |
---|
202 | */ |
---|
203 | FEMTO(-15, "FEMTO", "f"), |
---|
204 | |
---|
205 | /** |
---|
206 | * The '<em><b>ATTO</b></em>' literal object. |
---|
207 | * <!-- begin-user-doc --> |
---|
208 | * <!-- end-user-doc --> |
---|
209 | * @see #ATTO_VALUE |
---|
210 | * @generated |
---|
211 | * @ordered |
---|
212 | */ |
---|
213 | ATTO(-18, "ATTO", "a"), |
---|
214 | |
---|
215 | /** |
---|
216 | * The '<em><b>ZEPTO</b></em>' literal object. |
---|
217 | * <!-- begin-user-doc --> |
---|
218 | * <!-- end-user-doc --> |
---|
219 | * @see #ZEPTO_VALUE |
---|
220 | * @generated |
---|
221 | * @ordered |
---|
222 | */ |
---|
223 | ZEPTO(-21, "ZEPTO", "z"), |
---|
224 | |
---|
225 | /** |
---|
226 | * The '<em><b>YOCTO</b></em>' literal object. |
---|
227 | * <!-- begin-user-doc --> |
---|
228 | * <!-- end-user-doc --> |
---|
229 | * @see #YOCTO_VALUE |
---|
230 | * @generated |
---|
231 | * @ordered |
---|
232 | */ |
---|
233 | YOCTO(-24, "YOCTO", "y"); |
---|
234 | |
---|
235 | /** |
---|
236 | * The '<em><b>NONE</b></em>' literal value. |
---|
237 | * <!-- begin-user-doc --> |
---|
238 | * <p> |
---|
239 | * If the meaning of '<em><b>NONE</b></em>' literal object isn't clear, |
---|
240 | * there really should be more of a description here... |
---|
241 | * </p> |
---|
242 | * <!-- end-user-doc --> |
---|
243 | * @see #NONE |
---|
244 | * @model |
---|
245 | * @generated |
---|
246 | * @ordered |
---|
247 | */ |
---|
248 | public static final int NONE_VALUE = 0; |
---|
249 | |
---|
250 | /** |
---|
251 | * The '<em><b>YOTTA</b></em>' literal value. |
---|
252 | * <!-- begin-user-doc --> |
---|
253 | * <p> |
---|
254 | * If the meaning of '<em><b>YOTTA</b></em>' literal object isn't clear, |
---|
255 | * there really should be more of a description here... |
---|
256 | * </p> |
---|
257 | * <!-- end-user-doc --> |
---|
258 | * @see #YOTTA |
---|
259 | * @model literal="Y" |
---|
260 | * @generated |
---|
261 | * @ordered |
---|
262 | */ |
---|
263 | public static final int YOTTA_VALUE = 24; |
---|
264 | |
---|
265 | /** |
---|
266 | * The '<em><b>ZETTA</b></em>' literal value. |
---|
267 | * <!-- begin-user-doc --> |
---|
268 | * <p> |
---|
269 | * If the meaning of '<em><b>ZETTA</b></em>' literal object isn't clear, |
---|
270 | * there really should be more of a description here... |
---|
271 | * </p> |
---|
272 | * <!-- end-user-doc --> |
---|
273 | * @see #ZETTA |
---|
274 | * @model literal="Z" |
---|
275 | * @generated |
---|
276 | * @ordered |
---|
277 | */ |
---|
278 | public static final int ZETTA_VALUE = 21; |
---|
279 | |
---|
280 | /** |
---|
281 | * The '<em><b>EXA</b></em>' literal value. |
---|
282 | * <!-- begin-user-doc --> |
---|
283 | * <p> |
---|
284 | * If the meaning of '<em><b>EXA</b></em>' literal object isn't clear, |
---|
285 | * there really should be more of a description here... |
---|
286 | * </p> |
---|
287 | * <!-- end-user-doc --> |
---|
288 | * @see #EXA |
---|
289 | * @model literal="E" |
---|
290 | * @generated |
---|
291 | * @ordered |
---|
292 | */ |
---|
293 | public static final int EXA_VALUE = 18; |
---|
294 | |
---|
295 | /** |
---|
296 | * The '<em><b>PETA</b></em>' literal value. |
---|
297 | * <!-- begin-user-doc --> |
---|
298 | * <p> |
---|
299 | * If the meaning of '<em><b>PETA</b></em>' literal object isn't clear, |
---|
300 | * there really should be more of a description here... |
---|
301 | * </p> |
---|
302 | * <!-- end-user-doc --> |
---|
303 | * @see #PETA |
---|
304 | * @model literal="P" |
---|
305 | * @generated |
---|
306 | * @ordered |
---|
307 | */ |
---|
308 | public static final int PETA_VALUE = 15; |
---|
309 | |
---|
310 | /** |
---|
311 | * The '<em><b>TERA</b></em>' literal value. |
---|
312 | * <!-- begin-user-doc --> |
---|
313 | * <p> |
---|
314 | * If the meaning of '<em><b>TERA</b></em>' literal object isn't clear, |
---|
315 | * there really should be more of a description here... |
---|
316 | * </p> |
---|
317 | * <!-- end-user-doc --> |
---|
318 | * @see #TERA |
---|
319 | * @model literal="T" |
---|
320 | * @generated |
---|
321 | * @ordered |
---|
322 | */ |
---|
323 | public static final int TERA_VALUE = 12; |
---|
324 | |
---|
325 | /** |
---|
326 | * The '<em><b>GIGA</b></em>' literal value. |
---|
327 | * <!-- begin-user-doc --> |
---|
328 | * <p> |
---|
329 | * If the meaning of '<em><b>GIGA</b></em>' literal object isn't clear, |
---|
330 | * there really should be more of a description here... |
---|
331 | * </p> |
---|
332 | * <!-- end-user-doc --> |
---|
333 | * @see #GIGA |
---|
334 | * @model literal="G" |
---|
335 | * @generated |
---|
336 | * @ordered |
---|
337 | */ |
---|
338 | public static final int GIGA_VALUE = 9; |
---|
339 | |
---|
340 | /** |
---|
341 | * The '<em><b>MEGA</b></em>' literal value. |
---|
342 | * <!-- begin-user-doc --> |
---|
343 | * <p> |
---|
344 | * If the meaning of '<em><b>MEGA</b></em>' literal object isn't clear, |
---|
345 | * there really should be more of a description here... |
---|
346 | * </p> |
---|
347 | * <!-- end-user-doc --> |
---|
348 | * @see #MEGA |
---|
349 | * @model literal="M" |
---|
350 | * @generated |
---|
351 | * @ordered |
---|
352 | */ |
---|
353 | public static final int MEGA_VALUE = 6; |
---|
354 | |
---|
355 | /** |
---|
356 | * The '<em><b>KILO</b></em>' literal value. |
---|
357 | * <!-- begin-user-doc --> |
---|
358 | * <p> |
---|
359 | * If the meaning of '<em><b>KILO</b></em>' literal object isn't clear, |
---|
360 | * there really should be more of a description here... |
---|
361 | * </p> |
---|
362 | * <!-- end-user-doc --> |
---|
363 | * @see #KILO |
---|
364 | * @model literal="K" |
---|
365 | * @generated |
---|
366 | * @ordered |
---|
367 | */ |
---|
368 | public static final int KILO_VALUE = 3; |
---|
369 | |
---|
370 | /** |
---|
371 | * The '<em><b>HECTO</b></em>' literal value. |
---|
372 | * <!-- begin-user-doc --> |
---|
373 | * <p> |
---|
374 | * If the meaning of '<em><b>HECTO</b></em>' literal object isn't clear, |
---|
375 | * there really should be more of a description here... |
---|
376 | * </p> |
---|
377 | * <!-- end-user-doc --> |
---|
378 | * @see #HECTO |
---|
379 | * @model literal="h" |
---|
380 | * @generated |
---|
381 | * @ordered |
---|
382 | */ |
---|
383 | public static final int HECTO_VALUE = 2; |
---|
384 | |
---|
385 | /** |
---|
386 | * The '<em><b>DEKA</b></em>' literal value. |
---|
387 | * <!-- begin-user-doc --> |
---|
388 | * <p> |
---|
389 | * If the meaning of '<em><b>DEKA</b></em>' literal object isn't clear, |
---|
390 | * there really should be more of a description here... |
---|
391 | * </p> |
---|
392 | * <!-- end-user-doc --> |
---|
393 | * @see #DEKA |
---|
394 | * @model literal="D" |
---|
395 | * @generated |
---|
396 | * @ordered |
---|
397 | */ |
---|
398 | public static final int DEKA_VALUE = 1; |
---|
399 | |
---|
400 | /** |
---|
401 | * The '<em><b>DECI</b></em>' literal value. |
---|
402 | * <!-- begin-user-doc --> |
---|
403 | * <p> |
---|
404 | * If the meaning of '<em><b>DECI</b></em>' literal object isn't clear, |
---|
405 | * there really should be more of a description here... |
---|
406 | * </p> |
---|
407 | * <!-- end-user-doc --> |
---|
408 | * @see #DECI |
---|
409 | * @model literal="d" |
---|
410 | * @generated |
---|
411 | * @ordered |
---|
412 | */ |
---|
413 | public static final int DECI_VALUE = -1; |
---|
414 | |
---|
415 | /** |
---|
416 | * The '<em><b>CENTI</b></em>' literal value. |
---|
417 | * <!-- begin-user-doc --> |
---|
418 | * <p> |
---|
419 | * If the meaning of '<em><b>CENTI</b></em>' literal object isn't clear, |
---|
420 | * there really should be more of a description here... |
---|
421 | * </p> |
---|
422 | * <!-- end-user-doc --> |
---|
423 | * @see #CENTI |
---|
424 | * @model literal="c" |
---|
425 | * @generated |
---|
426 | * @ordered |
---|
427 | */ |
---|
428 | public static final int CENTI_VALUE = -2; |
---|
429 | |
---|
430 | /** |
---|
431 | * The '<em><b>MILLI</b></em>' literal value. |
---|
432 | * <!-- begin-user-doc --> |
---|
433 | * <p> |
---|
434 | * If the meaning of '<em><b>MILLI</b></em>' literal object isn't clear, |
---|
435 | * there really should be more of a description here... |
---|
436 | * </p> |
---|
437 | * <!-- end-user-doc --> |
---|
438 | * @see #MILLI |
---|
439 | * @model literal="m" |
---|
440 | * @generated |
---|
441 | * @ordered |
---|
442 | */ |
---|
443 | public static final int MILLI_VALUE = -3; |
---|
444 | |
---|
445 | /** |
---|
446 | * The '<em><b>MICRO</b></em>' literal value. |
---|
447 | * <!-- begin-user-doc --> |
---|
448 | * <p> |
---|
449 | * If the meaning of '<em><b>MICRO</b></em>' literal object isn't clear, |
---|
450 | * there really should be more of a description here... |
---|
451 | * </p> |
---|
452 | * <!-- end-user-doc --> |
---|
453 | * @see #MICRO |
---|
454 | * @model literal="u" |
---|
455 | * @generated |
---|
456 | * @ordered |
---|
457 | */ |
---|
458 | public static final int MICRO_VALUE = -6; |
---|
459 | |
---|
460 | /** |
---|
461 | * The '<em><b>NANO</b></em>' literal value. |
---|
462 | * <!-- begin-user-doc --> |
---|
463 | * <p> |
---|
464 | * If the meaning of '<em><b>NANO</b></em>' literal object isn't clear, |
---|
465 | * there really should be more of a description here... |
---|
466 | * </p> |
---|
467 | * <!-- end-user-doc --> |
---|
468 | * @see #NANO |
---|
469 | * @model literal="n" |
---|
470 | * @generated |
---|
471 | * @ordered |
---|
472 | */ |
---|
473 | public static final int NANO_VALUE = -9; |
---|
474 | |
---|
475 | /** |
---|
476 | * The '<em><b>PICO</b></em>' literal value. |
---|
477 | * <!-- begin-user-doc --> |
---|
478 | * <p> |
---|
479 | * If the meaning of '<em><b>PICO</b></em>' literal object isn't clear, |
---|
480 | * there really should be more of a description here... |
---|
481 | * </p> |
---|
482 | * <!-- end-user-doc --> |
---|
483 | * @see #PICO |
---|
484 | * @model literal="p" |
---|
485 | * @generated |
---|
486 | * @ordered |
---|
487 | */ |
---|
488 | public static final int PICO_VALUE = -12; |
---|
489 | |
---|
490 | /** |
---|
491 | * The '<em><b>FEMTO</b></em>' literal value. |
---|
492 | * <!-- begin-user-doc --> |
---|
493 | * <p> |
---|
494 | * If the meaning of '<em><b>FEMTO</b></em>' literal object isn't clear, |
---|
495 | * there really should be more of a description here... |
---|
496 | * </p> |
---|
497 | * <!-- end-user-doc --> |
---|
498 | * @see #FEMTO |
---|
499 | * @model literal="f" |
---|
500 | * @generated |
---|
501 | * @ordered |
---|
502 | */ |
---|
503 | public static final int FEMTO_VALUE = -15; |
---|
504 | |
---|
505 | /** |
---|
506 | * The '<em><b>ATTO</b></em>' literal value. |
---|
507 | * <!-- begin-user-doc --> |
---|
508 | * <p> |
---|
509 | * If the meaning of '<em><b>ATTO</b></em>' literal object isn't clear, |
---|
510 | * there really should be more of a description here... |
---|
511 | * </p> |
---|
512 | * <!-- end-user-doc --> |
---|
513 | * @see #ATTO |
---|
514 | * @model literal="a" |
---|
515 | * @generated |
---|
516 | * @ordered |
---|
517 | */ |
---|
518 | public static final int ATTO_VALUE = -18; |
---|
519 | |
---|
520 | /** |
---|
521 | * The '<em><b>ZEPTO</b></em>' literal value. |
---|
522 | * <!-- begin-user-doc --> |
---|
523 | * <p> |
---|
524 | * If the meaning of '<em><b>ZEPTO</b></em>' literal object isn't clear, |
---|
525 | * there really should be more of a description here... |
---|
526 | * </p> |
---|
527 | * <!-- end-user-doc --> |
---|
528 | * @see #ZEPTO |
---|
529 | * @model literal="z" |
---|
530 | * @generated |
---|
531 | * @ordered |
---|
532 | */ |
---|
533 | public static final int ZEPTO_VALUE = -21; |
---|
534 | |
---|
535 | /** |
---|
536 | * The '<em><b>YOCTO</b></em>' literal value. |
---|
537 | * <!-- begin-user-doc --> |
---|
538 | * <p> |
---|
539 | * If the meaning of '<em><b>YOCTO</b></em>' literal object isn't clear, |
---|
540 | * there really should be more of a description here... |
---|
541 | * </p> |
---|
542 | * <!-- end-user-doc --> |
---|
543 | * @see #YOCTO |
---|
544 | * @model literal="y" |
---|
545 | * @generated |
---|
546 | * @ordered |
---|
547 | */ |
---|
548 | public static final int YOCTO_VALUE = -24; |
---|
549 | |
---|
550 | /** |
---|
551 | * An array of all the '<em><b>Unit Prefixes</b></em>' enumerators. |
---|
552 | * <!-- begin-user-doc --> |
---|
553 | * <!-- end-user-doc --> |
---|
554 | * @generated |
---|
555 | */ |
---|
556 | private static final UnitPrefixes[] VALUES_ARRAY = |
---|
557 | new UnitPrefixes[] { |
---|
558 | NONE, |
---|
559 | YOTTA, |
---|
560 | ZETTA, |
---|
561 | EXA, |
---|
562 | PETA, |
---|
563 | TERA, |
---|
564 | GIGA, |
---|
565 | MEGA, |
---|
566 | KILO, |
---|
567 | HECTO, |
---|
568 | DEKA, |
---|
569 | DECI, |
---|
570 | CENTI, |
---|
571 | MILLI, |
---|
572 | MICRO, |
---|
573 | NANO, |
---|
574 | PICO, |
---|
575 | FEMTO, |
---|
576 | ATTO, |
---|
577 | ZEPTO, |
---|
578 | YOCTO, |
---|
579 | }; |
---|
580 | |
---|
581 | /** |
---|
582 | * A public read-only list of all the '<em><b>Unit Prefixes</b></em>' enumerators. |
---|
583 | * <!-- begin-user-doc --> |
---|
584 | * <!-- end-user-doc --> |
---|
585 | * @generated |
---|
586 | */ |
---|
587 | public static final List<UnitPrefixes> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
---|
588 | |
---|
589 | /** |
---|
590 | * Returns the '<em><b>Unit Prefixes</b></em>' literal with the specified literal value. |
---|
591 | * <!-- begin-user-doc --> |
---|
592 | * <!-- end-user-doc --> |
---|
593 | * @generated |
---|
594 | */ |
---|
595 | public static UnitPrefixes get(String literal) { |
---|
596 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
---|
597 | UnitPrefixes result = VALUES_ARRAY[i]; |
---|
598 | if (result.toString().equals(literal)) { |
---|
599 | return result; |
---|
600 | } |
---|
601 | } |
---|
602 | return null; |
---|
603 | } |
---|
604 | |
---|
605 | /** |
---|
606 | * Returns the '<em><b>Unit Prefixes</b></em>' literal with the specified name. |
---|
607 | * <!-- begin-user-doc --> |
---|
608 | * <!-- end-user-doc --> |
---|
609 | * @generated |
---|
610 | */ |
---|
611 | public static UnitPrefixes getByName(String name) { |
---|
612 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
---|
613 | UnitPrefixes result = VALUES_ARRAY[i]; |
---|
614 | if (result.getName().equals(name)) { |
---|
615 | return result; |
---|
616 | } |
---|
617 | } |
---|
618 | return null; |
---|
619 | } |
---|
620 | |
---|
621 | /** |
---|
622 | * Returns the '<em><b>Unit Prefixes</b></em>' literal with the specified integer value. |
---|
623 | * <!-- begin-user-doc --> |
---|
624 | * <!-- end-user-doc --> |
---|
625 | * @generated |
---|
626 | */ |
---|
627 | public static UnitPrefixes get(int value) { |
---|
628 | switch (value) { |
---|
629 | case NONE_VALUE: return NONE; |
---|
630 | case YOTTA_VALUE: return YOTTA; |
---|
631 | case ZETTA_VALUE: return ZETTA; |
---|
632 | case EXA_VALUE: return EXA; |
---|
633 | case PETA_VALUE: return PETA; |
---|
634 | case TERA_VALUE: return TERA; |
---|
635 | case GIGA_VALUE: return GIGA; |
---|
636 | case MEGA_VALUE: return MEGA; |
---|
637 | case KILO_VALUE: return KILO; |
---|
638 | case HECTO_VALUE: return HECTO; |
---|
639 | case DEKA_VALUE: return DEKA; |
---|
640 | case DECI_VALUE: return DECI; |
---|
641 | case CENTI_VALUE: return CENTI; |
---|
642 | case MILLI_VALUE: return MILLI; |
---|
643 | case MICRO_VALUE: return MICRO; |
---|
644 | case NANO_VALUE: return NANO; |
---|
645 | case PICO_VALUE: return PICO; |
---|
646 | case FEMTO_VALUE: return FEMTO; |
---|
647 | case ATTO_VALUE: return ATTO; |
---|
648 | case ZEPTO_VALUE: return ZEPTO; |
---|
649 | case YOCTO_VALUE: return YOCTO; |
---|
650 | } |
---|
651 | return null; |
---|
652 | } |
---|
653 | |
---|
654 | /** |
---|
655 | * <!-- begin-user-doc --> |
---|
656 | * <!-- end-user-doc --> |
---|
657 | * @generated |
---|
658 | */ |
---|
659 | private final int value; |
---|
660 | |
---|
661 | /** |
---|
662 | * <!-- begin-user-doc --> |
---|
663 | * <!-- end-user-doc --> |
---|
664 | * @generated |
---|
665 | */ |
---|
666 | private final String name; |
---|
667 | |
---|
668 | /** |
---|
669 | * <!-- begin-user-doc --> |
---|
670 | * <!-- end-user-doc --> |
---|
671 | * @generated |
---|
672 | */ |
---|
673 | private final String literal; |
---|
674 | |
---|
675 | /** |
---|
676 | * Only this class can construct instances. |
---|
677 | * <!-- begin-user-doc --> |
---|
678 | * <!-- end-user-doc --> |
---|
679 | * @generated |
---|
680 | */ |
---|
681 | private UnitPrefixes(int value, String name, String literal) { |
---|
682 | this.value = value; |
---|
683 | this.name = name; |
---|
684 | this.literal = literal; |
---|
685 | } |
---|
686 | |
---|
687 | /** |
---|
688 | * <!-- begin-user-doc --> |
---|
689 | * <!-- end-user-doc --> |
---|
690 | * @generated |
---|
691 | */ |
---|
692 | public int getValue() { |
---|
693 | return value; |
---|
694 | } |
---|
695 | |
---|
696 | /** |
---|
697 | * <!-- begin-user-doc --> |
---|
698 | * <!-- end-user-doc --> |
---|
699 | * @generated |
---|
700 | */ |
---|
701 | public String getName() { |
---|
702 | return name; |
---|
703 | } |
---|
704 | |
---|
705 | /** |
---|
706 | * <!-- begin-user-doc --> |
---|
707 | * <!-- end-user-doc --> |
---|
708 | * @generated |
---|
709 | */ |
---|
710 | public String getLiteral() { |
---|
711 | return literal; |
---|
712 | } |
---|
713 | |
---|
714 | /** |
---|
715 | * Returns the literal value of the enumerator, which is its string representation. |
---|
716 | * <!-- begin-user-doc --> |
---|
717 | * <!-- end-user-doc --> |
---|
718 | * @generated |
---|
719 | */ |
---|
720 | @Override |
---|
721 | public String toString() { |
---|
722 | return literal; |
---|
723 | } |
---|
724 | |
---|
725 | } //UnitPrefixes |
---|