diff options
Diffstat (limited to 'Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDirectProductImpl.java')
-rw-r--r-- | Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDirectProductImpl.java | 392 |
1 files changed, 392 insertions, 0 deletions
diff --git a/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDirectProductImpl.java b/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDirectProductImpl.java new file mode 100644 index 00000000..a80d74fe --- /dev/null +++ b/Solvers/Alloy-Solver2/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen/hu/bme/mit/inf/dslreasoner/alloyLanguage/impl/ALSDirectProductImpl.java | |||
@@ -0,0 +1,392 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.alloyLanguage.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSDirectProduct; | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity; | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm; | ||
8 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.InternalEObject; | ||
15 | |||
16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>ALS Direct Product</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDirectProductImpl#getLeftOperand <em>Left Operand</em>}</li> | ||
27 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDirectProductImpl#getLeftMultiplicit <em>Left Multiplicit</em>}</li> | ||
28 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDirectProductImpl#getRightMultiplicit <em>Right Multiplicit</em>}</li> | ||
29 | * <li>{@link hu.bme.mit.inf.dslreasoner.alloyLanguage.impl.ALSDirectProductImpl#getRightOperand <em>Right Operand</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class ALSDirectProductImpl extends ALSTermImpl implements ALSDirectProduct | ||
35 | { | ||
36 | /** | ||
37 | * The cached value of the '{@link #getLeftOperand() <em>Left Operand</em>}' containment reference. | ||
38 | * <!-- begin-user-doc --> | ||
39 | * <!-- end-user-doc --> | ||
40 | * @see #getLeftOperand() | ||
41 | * @generated | ||
42 | * @ordered | ||
43 | */ | ||
44 | protected ALSTerm leftOperand; | ||
45 | |||
46 | /** | ||
47 | * The default value of the '{@link #getLeftMultiplicit() <em>Left Multiplicit</em>}' attribute. | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @see #getLeftMultiplicit() | ||
51 | * @generated | ||
52 | * @ordered | ||
53 | */ | ||
54 | protected static final ALSMultiplicity LEFT_MULTIPLICIT_EDEFAULT = ALSMultiplicity.ALL; | ||
55 | |||
56 | /** | ||
57 | * The cached value of the '{@link #getLeftMultiplicit() <em>Left Multiplicit</em>}' attribute. | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @see #getLeftMultiplicit() | ||
61 | * @generated | ||
62 | * @ordered | ||
63 | */ | ||
64 | protected ALSMultiplicity leftMultiplicit = LEFT_MULTIPLICIT_EDEFAULT; | ||
65 | |||
66 | /** | ||
67 | * The default value of the '{@link #getRightMultiplicit() <em>Right Multiplicit</em>}' attribute. | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @see #getRightMultiplicit() | ||
71 | * @generated | ||
72 | * @ordered | ||
73 | */ | ||
74 | protected static final ALSMultiplicity RIGHT_MULTIPLICIT_EDEFAULT = ALSMultiplicity.ALL; | ||
75 | |||
76 | /** | ||
77 | * The cached value of the '{@link #getRightMultiplicit() <em>Right Multiplicit</em>}' attribute. | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @see #getRightMultiplicit() | ||
81 | * @generated | ||
82 | * @ordered | ||
83 | */ | ||
84 | protected ALSMultiplicity rightMultiplicit = RIGHT_MULTIPLICIT_EDEFAULT; | ||
85 | |||
86 | /** | ||
87 | * The cached value of the '{@link #getRightOperand() <em>Right Operand</em>}' containment reference. | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @see #getRightOperand() | ||
91 | * @generated | ||
92 | * @ordered | ||
93 | */ | ||
94 | protected ALSTerm rightOperand; | ||
95 | |||
96 | /** | ||
97 | * <!-- begin-user-doc --> | ||
98 | * <!-- end-user-doc --> | ||
99 | * @generated | ||
100 | */ | ||
101 | protected ALSDirectProductImpl() | ||
102 | { | ||
103 | super(); | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | */ | ||
111 | @Override | ||
112 | protected EClass eStaticClass() | ||
113 | { | ||
114 | return AlloyLanguagePackage.Literals.ALS_DIRECT_PRODUCT; | ||
115 | } | ||
116 | |||
117 | /** | ||
118 | * <!-- begin-user-doc --> | ||
119 | * <!-- end-user-doc --> | ||
120 | * @generated | ||
121 | */ | ||
122 | public ALSTerm getLeftOperand() | ||
123 | { | ||
124 | return leftOperand; | ||
125 | } | ||
126 | |||
127 | /** | ||
128 | * <!-- begin-user-doc --> | ||
129 | * <!-- end-user-doc --> | ||
130 | * @generated | ||
131 | */ | ||
132 | public NotificationChain basicSetLeftOperand(ALSTerm newLeftOperand, NotificationChain msgs) | ||
133 | { | ||
134 | ALSTerm oldLeftOperand = leftOperand; | ||
135 | leftOperand = newLeftOperand; | ||
136 | if (eNotificationRequired()) | ||
137 | { | ||
138 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND, oldLeftOperand, newLeftOperand); | ||
139 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
140 | } | ||
141 | return msgs; | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * <!-- begin-user-doc --> | ||
146 | * <!-- end-user-doc --> | ||
147 | * @generated | ||
148 | */ | ||
149 | public void setLeftOperand(ALSTerm newLeftOperand) | ||
150 | { | ||
151 | if (newLeftOperand != leftOperand) | ||
152 | { | ||
153 | NotificationChain msgs = null; | ||
154 | if (leftOperand != null) | ||
155 | msgs = ((InternalEObject)leftOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND, null, msgs); | ||
156 | if (newLeftOperand != null) | ||
157 | msgs = ((InternalEObject)newLeftOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND, null, msgs); | ||
158 | msgs = basicSetLeftOperand(newLeftOperand, msgs); | ||
159 | if (msgs != null) msgs.dispatch(); | ||
160 | } | ||
161 | else if (eNotificationRequired()) | ||
162 | eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND, newLeftOperand, newLeftOperand)); | ||
163 | } | ||
164 | |||
165 | /** | ||
166 | * <!-- begin-user-doc --> | ||
167 | * <!-- end-user-doc --> | ||
168 | * @generated | ||
169 | */ | ||
170 | public ALSMultiplicity getLeftMultiplicit() | ||
171 | { | ||
172 | return leftMultiplicit; | ||
173 | } | ||
174 | |||
175 | /** | ||
176 | * <!-- begin-user-doc --> | ||
177 | * <!-- end-user-doc --> | ||
178 | * @generated | ||
179 | */ | ||
180 | public void setLeftMultiplicit(ALSMultiplicity newLeftMultiplicit) | ||
181 | { | ||
182 | ALSMultiplicity oldLeftMultiplicit = leftMultiplicit; | ||
183 | leftMultiplicit = newLeftMultiplicit == null ? LEFT_MULTIPLICIT_EDEFAULT : newLeftMultiplicit; | ||
184 | if (eNotificationRequired()) | ||
185 | eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_MULTIPLICIT, oldLeftMultiplicit, leftMultiplicit)); | ||
186 | } | ||
187 | |||
188 | /** | ||
189 | * <!-- begin-user-doc --> | ||
190 | * <!-- end-user-doc --> | ||
191 | * @generated | ||
192 | */ | ||
193 | public ALSMultiplicity getRightMultiplicit() | ||
194 | { | ||
195 | return rightMultiplicit; | ||
196 | } | ||
197 | |||
198 | /** | ||
199 | * <!-- begin-user-doc --> | ||
200 | * <!-- end-user-doc --> | ||
201 | * @generated | ||
202 | */ | ||
203 | public void setRightMultiplicit(ALSMultiplicity newRightMultiplicit) | ||
204 | { | ||
205 | ALSMultiplicity oldRightMultiplicit = rightMultiplicit; | ||
206 | rightMultiplicit = newRightMultiplicit == null ? RIGHT_MULTIPLICIT_EDEFAULT : newRightMultiplicit; | ||
207 | if (eNotificationRequired()) | ||
208 | eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_MULTIPLICIT, oldRightMultiplicit, rightMultiplicit)); | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * <!-- begin-user-doc --> | ||
213 | * <!-- end-user-doc --> | ||
214 | * @generated | ||
215 | */ | ||
216 | public ALSTerm getRightOperand() | ||
217 | { | ||
218 | return rightOperand; | ||
219 | } | ||
220 | |||
221 | /** | ||
222 | * <!-- begin-user-doc --> | ||
223 | * <!-- end-user-doc --> | ||
224 | * @generated | ||
225 | */ | ||
226 | public NotificationChain basicSetRightOperand(ALSTerm newRightOperand, NotificationChain msgs) | ||
227 | { | ||
228 | ALSTerm oldRightOperand = rightOperand; | ||
229 | rightOperand = newRightOperand; | ||
230 | if (eNotificationRequired()) | ||
231 | { | ||
232 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND, oldRightOperand, newRightOperand); | ||
233 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
234 | } | ||
235 | return msgs; | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * <!-- begin-user-doc --> | ||
240 | * <!-- end-user-doc --> | ||
241 | * @generated | ||
242 | */ | ||
243 | public void setRightOperand(ALSTerm newRightOperand) | ||
244 | { | ||
245 | if (newRightOperand != rightOperand) | ||
246 | { | ||
247 | NotificationChain msgs = null; | ||
248 | if (rightOperand != null) | ||
249 | msgs = ((InternalEObject)rightOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND, null, msgs); | ||
250 | if (newRightOperand != null) | ||
251 | msgs = ((InternalEObject)newRightOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND, null, msgs); | ||
252 | msgs = basicSetRightOperand(newRightOperand, msgs); | ||
253 | if (msgs != null) msgs.dispatch(); | ||
254 | } | ||
255 | else if (eNotificationRequired()) | ||
256 | eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND, newRightOperand, newRightOperand)); | ||
257 | } | ||
258 | |||
259 | /** | ||
260 | * <!-- begin-user-doc --> | ||
261 | * <!-- end-user-doc --> | ||
262 | * @generated | ||
263 | */ | ||
264 | @Override | ||
265 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
266 | { | ||
267 | switch (featureID) | ||
268 | { | ||
269 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND: | ||
270 | return basicSetLeftOperand(null, msgs); | ||
271 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND: | ||
272 | return basicSetRightOperand(null, msgs); | ||
273 | } | ||
274 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
275 | } | ||
276 | |||
277 | /** | ||
278 | * <!-- begin-user-doc --> | ||
279 | * <!-- end-user-doc --> | ||
280 | * @generated | ||
281 | */ | ||
282 | @Override | ||
283 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
284 | { | ||
285 | switch (featureID) | ||
286 | { | ||
287 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND: | ||
288 | return getLeftOperand(); | ||
289 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_MULTIPLICIT: | ||
290 | return getLeftMultiplicit(); | ||
291 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_MULTIPLICIT: | ||
292 | return getRightMultiplicit(); | ||
293 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND: | ||
294 | return getRightOperand(); | ||
295 | } | ||
296 | return super.eGet(featureID, resolve, coreType); | ||
297 | } | ||
298 | |||
299 | /** | ||
300 | * <!-- begin-user-doc --> | ||
301 | * <!-- end-user-doc --> | ||
302 | * @generated | ||
303 | */ | ||
304 | @Override | ||
305 | public void eSet(int featureID, Object newValue) | ||
306 | { | ||
307 | switch (featureID) | ||
308 | { | ||
309 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND: | ||
310 | setLeftOperand((ALSTerm)newValue); | ||
311 | return; | ||
312 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_MULTIPLICIT: | ||
313 | setLeftMultiplicit((ALSMultiplicity)newValue); | ||
314 | return; | ||
315 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_MULTIPLICIT: | ||
316 | setRightMultiplicit((ALSMultiplicity)newValue); | ||
317 | return; | ||
318 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND: | ||
319 | setRightOperand((ALSTerm)newValue); | ||
320 | return; | ||
321 | } | ||
322 | super.eSet(featureID, newValue); | ||
323 | } | ||
324 | |||
325 | /** | ||
326 | * <!-- begin-user-doc --> | ||
327 | * <!-- end-user-doc --> | ||
328 | * @generated | ||
329 | */ | ||
330 | @Override | ||
331 | public void eUnset(int featureID) | ||
332 | { | ||
333 | switch (featureID) | ||
334 | { | ||
335 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND: | ||
336 | setLeftOperand((ALSTerm)null); | ||
337 | return; | ||
338 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_MULTIPLICIT: | ||
339 | setLeftMultiplicit(LEFT_MULTIPLICIT_EDEFAULT); | ||
340 | return; | ||
341 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_MULTIPLICIT: | ||
342 | setRightMultiplicit(RIGHT_MULTIPLICIT_EDEFAULT); | ||
343 | return; | ||
344 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND: | ||
345 | setRightOperand((ALSTerm)null); | ||
346 | return; | ||
347 | } | ||
348 | super.eUnset(featureID); | ||
349 | } | ||
350 | |||
351 | /** | ||
352 | * <!-- begin-user-doc --> | ||
353 | * <!-- end-user-doc --> | ||
354 | * @generated | ||
355 | */ | ||
356 | @Override | ||
357 | public boolean eIsSet(int featureID) | ||
358 | { | ||
359 | switch (featureID) | ||
360 | { | ||
361 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_OPERAND: | ||
362 | return leftOperand != null; | ||
363 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__LEFT_MULTIPLICIT: | ||
364 | return leftMultiplicit != LEFT_MULTIPLICIT_EDEFAULT; | ||
365 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_MULTIPLICIT: | ||
366 | return rightMultiplicit != RIGHT_MULTIPLICIT_EDEFAULT; | ||
367 | case AlloyLanguagePackage.ALS_DIRECT_PRODUCT__RIGHT_OPERAND: | ||
368 | return rightOperand != null; | ||
369 | } | ||
370 | return super.eIsSet(featureID); | ||
371 | } | ||
372 | |||
373 | /** | ||
374 | * <!-- begin-user-doc --> | ||
375 | * <!-- end-user-doc --> | ||
376 | * @generated | ||
377 | */ | ||
378 | @Override | ||
379 | public String toString() | ||
380 | { | ||
381 | if (eIsProxy()) return super.toString(); | ||
382 | |||
383 | StringBuffer result = new StringBuffer(super.toString()); | ||
384 | result.append(" (leftMultiplicit: "); | ||
385 | result.append(leftMultiplicit); | ||
386 | result.append(", rightMultiplicit: "); | ||
387 | result.append(rightMultiplicit); | ||
388 | result.append(')'); | ||
389 | return result.toString(); | ||
390 | } | ||
391 | |||
392 | } //ALSDirectProductImpl | ||