1 | /** |
2 | * Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany |
3 | * |
4 | * $Id$ |
5 | */ |
6 | package de.uka.ipd.sdq.pcm; |
7 | |
8 | import java.util.Arrays; |
9 | import java.util.Collections; |
10 | import java.util.List; |
11 | |
12 | import org.eclipse.emf.common.util.Enumerator; |
13 | |
14 | /** |
15 | * <!-- begin-user-doc --> |
16 | * A representation of the literals of the enumeration '<em><b>Dummy Enum</b></em>', |
17 | * and utility methods for working with them. |
18 | * <!-- end-user-doc --> |
19 | * <!-- begin-model-doc --> |
20 | * needed to force ecore to generate pcm root package |
21 | * <!-- end-model-doc --> |
22 | * @see de.uka.ipd.sdq.pcm.PcmPackage#getDummyEnum() |
23 | * @model |
24 | * @generated |
25 | */ |
26 | public enum DummyEnum implements Enumerator { |
27 | ; |
28 | |
29 | /** |
30 | * <!-- begin-user-doc --> |
31 | * <!-- end-user-doc --> |
32 | * @generated |
33 | */ |
34 | public static final String copyright = "Copyright 2005-2009 by SDQ, IPD, University of Karlsruhe, Germany"; |
35 | |
36 | /** |
37 | * An array of all the '<em><b>Dummy Enum</b></em>' enumerators. |
38 | * <!-- begin-user-doc --> |
39 | * <!-- end-user-doc --> |
40 | * @generated |
41 | */ |
42 | private static final DummyEnum[] VALUES_ARRAY = |
43 | new DummyEnum[] { |
44 | }; |
45 | |
46 | /** |
47 | * A public read-only list of all the '<em><b>Dummy Enum</b></em>' enumerators. |
48 | * <!-- begin-user-doc --> |
49 | * <!-- end-user-doc --> |
50 | * @generated |
51 | */ |
52 | public static final List<DummyEnum> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
53 | |
54 | /** |
55 | * Returns the '<em><b>Dummy Enum</b></em>' literal with the specified literal value. |
56 | * <!-- begin-user-doc --> |
57 | * <!-- end-user-doc --> |
58 | * @generated |
59 | */ |
60 | public static DummyEnum get(String literal) { |
61 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
62 | DummyEnum result = VALUES_ARRAY[i]; |
63 | if (result.toString().equals(literal)) { |
64 | return result; |
65 | } |
66 | } |
67 | return null; |
68 | } |
69 | |
70 | /** |
71 | * Returns the '<em><b>Dummy Enum</b></em>' literal with the specified name. |
72 | * <!-- begin-user-doc --> |
73 | * <!-- end-user-doc --> |
74 | * @generated |
75 | */ |
76 | public static DummyEnum getByName(String name) { |
77 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
78 | DummyEnum result = VALUES_ARRAY[i]; |
79 | if (result.getName().equals(name)) { |
80 | return result; |
81 | } |
82 | } |
83 | return null; |
84 | } |
85 | |
86 | /** |
87 | * Returns the '<em><b>Dummy Enum</b></em>' literal with the specified integer value. |
88 | * <!-- begin-user-doc --> |
89 | * <!-- end-user-doc --> |
90 | * @generated |
91 | */ |
92 | public static DummyEnum get(int value) { |
93 | switch (value) { |
94 | } |
95 | return null; |
96 | } |
97 | |
98 | /** |
99 | * <!-- begin-user-doc --> |
100 | * <!-- end-user-doc --> |
101 | * @generated |
102 | */ |
103 | private final int value; |
104 | |
105 | /** |
106 | * <!-- begin-user-doc --> |
107 | * <!-- end-user-doc --> |
108 | * @generated |
109 | */ |
110 | private final String name; |
111 | |
112 | /** |
113 | * <!-- begin-user-doc --> |
114 | * <!-- end-user-doc --> |
115 | * @generated |
116 | */ |
117 | private final String literal; |
118 | |
119 | /** |
120 | * Only this class can construct instances. |
121 | * <!-- begin-user-doc --> |
122 | * <!-- end-user-doc --> |
123 | * @generated |
124 | */ |
125 | private DummyEnum(int value, String name, String literal) { |
126 | this.value = value; |
127 | this.name = name; |
128 | this.literal = literal; |
129 | } |
130 | |
131 | /** |
132 | * <!-- begin-user-doc --> |
133 | * <!-- end-user-doc --> |
134 | * @generated |
135 | */ |
136 | public int getValue() { |
137 | return value; |
138 | } |
139 | |
140 | /** |
141 | * <!-- begin-user-doc --> |
142 | * <!-- end-user-doc --> |
143 | * @generated |
144 | */ |
145 | public String getName() { |
146 | return name; |
147 | } |
148 | |
149 | /** |
150 | * <!-- begin-user-doc --> |
151 | * <!-- end-user-doc --> |
152 | * @generated |
153 | */ |
154 | public String getLiteral() { |
155 | return literal; |
156 | } |
157 | |
158 | /** |
159 | * Returns the literal value of the enumerator, which is its string representation. |
160 | * <!-- begin-user-doc --> |
161 | * <!-- end-user-doc --> |
162 | * @generated |
163 | */ |
164 | @Override |
165 | public String toString() { |
166 | return literal; |
167 | } |
168 | |
169 | } //DummyEnum |