diff options
Diffstat (limited to 'Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/ALSNumericOperator.java')
-rw-r--r-- | Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/ALSNumericOperator.java | 310 |
1 files changed, 310 insertions, 0 deletions
diff --git a/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/ALSNumericOperator.java b/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/ALSNumericOperator.java new file mode 100644 index 00000000..1d91d190 --- /dev/null +++ b/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/ALSNumericOperator.java | |||
@@ -0,0 +1,310 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.alloyLanguage; | ||
4 | |||
5 | import java.util.Arrays; | ||
6 | import java.util.Collections; | ||
7 | import java.util.List; | ||
8 | |||
9 | import org.eclipse.emf.common.util.Enumerator; | ||
10 | |||
11 | /** | ||
12 | * <!-- begin-user-doc --> | ||
13 | * A representation of the literals of the enumeration '<em><b>ALS Numeric Operator</b></em>', | ||
14 | * and utility methods for working with them. | ||
15 | * <!-- end-user-doc --> | ||
16 | * @see hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage#getALSNumericOperator() | ||
17 | * @model | ||
18 | * @generated | ||
19 | */ | ||
20 | public enum ALSNumericOperator implements Enumerator | ||
21 | { | ||
22 | /** | ||
23 | * The '<em><b>Plus</b></em>' literal object. | ||
24 | * <!-- begin-user-doc --> | ||
25 | * <!-- end-user-doc --> | ||
26 | * @see #PLUS_VALUE | ||
27 | * @generated | ||
28 | * @ordered | ||
29 | */ | ||
30 | PLUS(0, "plus", "plus"), | ||
31 | |||
32 | /** | ||
33 | * The '<em><b>Sub</b></em>' literal object. | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <!-- end-user-doc --> | ||
36 | * @see #SUB_VALUE | ||
37 | * @generated | ||
38 | * @ordered | ||
39 | */ | ||
40 | SUB(1, "sub", "sub"), | ||
41 | |||
42 | /** | ||
43 | * The '<em><b>Mul</b></em>' literal object. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @see #MUL_VALUE | ||
47 | * @generated | ||
48 | * @ordered | ||
49 | */ | ||
50 | MUL(2, "mul", "mul"), | ||
51 | |||
52 | /** | ||
53 | * The '<em><b>Rem</b></em>' literal object. | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @see #REM_VALUE | ||
57 | * @generated | ||
58 | * @ordered | ||
59 | */ | ||
60 | REM(3, "rem", "rem"), | ||
61 | |||
62 | /** | ||
63 | * The '<em><b>Div</b></em>' literal object. | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @see #DIV_VALUE | ||
67 | * @generated | ||
68 | * @ordered | ||
69 | */ | ||
70 | DIV(4, "div", "div"); | ||
71 | |||
72 | /** | ||
73 | * The '<em><b>Plus</b></em>' literal value. | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <p> | ||
76 | * If the meaning of '<em><b>Plus</b></em>' literal object isn't clear, | ||
77 | * there really should be more of a description here... | ||
78 | * </p> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @see #PLUS | ||
81 | * @model name="plus" | ||
82 | * @generated | ||
83 | * @ordered | ||
84 | */ | ||
85 | public static final int PLUS_VALUE = 0; | ||
86 | |||
87 | /** | ||
88 | * The '<em><b>Sub</b></em>' literal value. | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <p> | ||
91 | * If the meaning of '<em><b>Sub</b></em>' literal object isn't clear, | ||
92 | * there really should be more of a description here... | ||
93 | * </p> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @see #SUB | ||
96 | * @model name="sub" | ||
97 | * @generated | ||
98 | * @ordered | ||
99 | */ | ||
100 | public static final int SUB_VALUE = 1; | ||
101 | |||
102 | /** | ||
103 | * The '<em><b>Mul</b></em>' literal value. | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <p> | ||
106 | * If the meaning of '<em><b>Mul</b></em>' literal object isn't clear, | ||
107 | * there really should be more of a description here... | ||
108 | * </p> | ||
109 | * <!-- end-user-doc --> | ||
110 | * @see #MUL | ||
111 | * @model name="mul" | ||
112 | * @generated | ||
113 | * @ordered | ||
114 | */ | ||
115 | public static final int MUL_VALUE = 2; | ||
116 | |||
117 | /** | ||
118 | * The '<em><b>Rem</b></em>' literal value. | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <p> | ||
121 | * If the meaning of '<em><b>Rem</b></em>' literal object isn't clear, | ||
122 | * there really should be more of a description here... | ||
123 | * </p> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @see #REM | ||
126 | * @model name="rem" | ||
127 | * @generated | ||
128 | * @ordered | ||
129 | */ | ||
130 | public static final int REM_VALUE = 3; | ||
131 | |||
132 | /** | ||
133 | * The '<em><b>Div</b></em>' literal value. | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <p> | ||
136 | * If the meaning of '<em><b>Div</b></em>' literal object isn't clear, | ||
137 | * there really should be more of a description here... | ||
138 | * </p> | ||
139 | * <!-- end-user-doc --> | ||
140 | * @see #DIV | ||
141 | * @model name="div" | ||
142 | * @generated | ||
143 | * @ordered | ||
144 | */ | ||
145 | public static final int DIV_VALUE = 4; | ||
146 | |||
147 | /** | ||
148 | * An array of all the '<em><b>ALS Numeric Operator</b></em>' enumerators. | ||
149 | * <!-- begin-user-doc --> | ||
150 | * <!-- end-user-doc --> | ||
151 | * @generated | ||
152 | */ | ||
153 | private static final ALSNumericOperator[] VALUES_ARRAY = | ||
154 | new ALSNumericOperator[] | ||
155 | { | ||
156 | PLUS, | ||
157 | SUB, | ||
158 | MUL, | ||
159 | REM, | ||
160 | DIV, | ||
161 | }; | ||
162 | |||
163 | /** | ||
164 | * A public read-only list of all the '<em><b>ALS Numeric Operator</b></em>' enumerators. | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | public static final List<ALSNumericOperator> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); | ||
170 | |||
171 | /** | ||
172 | * Returns the '<em><b>ALS Numeric Operator</b></em>' literal with the specified literal value. | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
175 | * @param literal the literal. | ||
176 | * @return the matching enumerator or <code>null</code>. | ||
177 | * @generated | ||
178 | */ | ||
179 | public static ALSNumericOperator get(String literal) | ||
180 | { | ||
181 | for (int i = 0; i < VALUES_ARRAY.length; ++i) | ||
182 | { | ||
183 | ALSNumericOperator result = VALUES_ARRAY[i]; | ||
184 | if (result.toString().equals(literal)) | ||
185 | { | ||
186 | return result; | ||
187 | } | ||
188 | } | ||
189 | return null; | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * Returns the '<em><b>ALS Numeric Operator</b></em>' literal with the specified name. | ||
194 | * <!-- begin-user-doc --> | ||
195 | * <!-- end-user-doc --> | ||
196 | * @param name the name. | ||
197 | * @return the matching enumerator or <code>null</code>. | ||
198 | * @generated | ||
199 | */ | ||
200 | public static ALSNumericOperator getByName(String name) | ||
201 | { | ||
202 | for (int i = 0; i < VALUES_ARRAY.length; ++i) | ||
203 | { | ||
204 | ALSNumericOperator result = VALUES_ARRAY[i]; | ||
205 | if (result.getName().equals(name)) | ||
206 | { | ||
207 | return result; | ||
208 | } | ||
209 | } | ||
210 | return null; | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * Returns the '<em><b>ALS Numeric Operator</b></em>' literal with the specified integer value. | ||
215 | * <!-- begin-user-doc --> | ||
216 | * <!-- end-user-doc --> | ||
217 | * @param value the integer value. | ||
218 | * @return the matching enumerator or <code>null</code>. | ||
219 | * @generated | ||
220 | */ | ||
221 | public static ALSNumericOperator get(int value) | ||
222 | { | ||
223 | switch (value) | ||
224 | { | ||
225 | case PLUS_VALUE: return PLUS; | ||
226 | case SUB_VALUE: return SUB; | ||
227 | case MUL_VALUE: return MUL; | ||
228 | case REM_VALUE: return REM; | ||
229 | case DIV_VALUE: return DIV; | ||
230 | } | ||
231 | return null; | ||
232 | } | ||
233 | |||
234 | /** | ||
235 | * <!-- begin-user-doc --> | ||
236 | * <!-- end-user-doc --> | ||
237 | * @generated | ||
238 | */ | ||
239 | private final int value; | ||
240 | |||
241 | /** | ||
242 | * <!-- begin-user-doc --> | ||
243 | * <!-- end-user-doc --> | ||
244 | * @generated | ||
245 | */ | ||
246 | private final String name; | ||
247 | |||
248 | /** | ||
249 | * <!-- begin-user-doc --> | ||
250 | * <!-- end-user-doc --> | ||
251 | * @generated | ||
252 | */ | ||
253 | private final String literal; | ||
254 | |||
255 | /** | ||
256 | * Only this class can construct instances. | ||
257 | * <!-- begin-user-doc --> | ||
258 | * <!-- end-user-doc --> | ||
259 | * @generated | ||
260 | */ | ||
261 | private ALSNumericOperator(int value, String name, String literal) | ||
262 | { | ||
263 | this.value = value; | ||
264 | this.name = name; | ||
265 | this.literal = literal; | ||
266 | } | ||
267 | |||
268 | /** | ||
269 | * <!-- begin-user-doc --> | ||
270 | * <!-- end-user-doc --> | ||
271 | * @generated | ||
272 | */ | ||
273 | public int getValue() | ||
274 | { | ||
275 | return value; | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * <!-- begin-user-doc --> | ||
280 | * <!-- end-user-doc --> | ||
281 | * @generated | ||
282 | */ | ||
283 | public String getName() | ||
284 | { | ||
285 | return name; | ||
286 | } | ||
287 | |||
288 | /** | ||
289 | * <!-- begin-user-doc --> | ||
290 | * <!-- end-user-doc --> | ||
291 | * @generated | ||
292 | */ | ||
293 | public String getLiteral() | ||
294 | { | ||
295 | return literal; | ||
296 | } | ||
297 | |||
298 | /** | ||
299 | * Returns the literal value of the enumerator, which is its string representation. | ||
300 | * <!-- begin-user-doc --> | ||
301 | * <!-- end-user-doc --> | ||
302 | * @generated | ||
303 | */ | ||
304 | @Override | ||
305 | public String toString() | ||
306 | { | ||
307 | return literal; | ||
308 | } | ||
309 | |||
310 | } //ALSNumericOperator | ||