aboutsummaryrefslogtreecommitdiffstats
path: root/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ConstraintImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ConstraintImpl.java')
-rw-r--r--Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ConstraintImpl.java393
1 files changed, 0 insertions, 393 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ConstraintImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ConstraintImpl.java
deleted file mode 100644
index 2f990fee..00000000
--- a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/ConstraintImpl.java
+++ /dev/null
@@ -1,393 +0,0 @@
1/**
2 * generated by Xtext 2.18.0.M3
3 */
4package org.eclipse.viatra.solver.language.solverLanguage.impl;
5
6import java.util.Collection;
7
8import org.eclipse.emf.common.notify.Notification;
9import org.eclipse.emf.common.notify.NotificationChain;
10
11import org.eclipse.emf.common.util.EList;
12
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.emf.ecore.InternalEObject;
15
16import org.eclipse.emf.ecore.impl.ENotificationImpl;
17import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
18
19import org.eclipse.emf.ecore.util.EObjectContainmentEList;
20import org.eclipse.emf.ecore.util.InternalEList;
21
22import org.eclipse.viatra.solver.language.solverLanguage.ClosureType;
23import org.eclipse.viatra.solver.language.solverLanguage.Constraint;
24import org.eclipse.viatra.solver.language.solverLanguage.Literal;
25import org.eclipse.viatra.solver.language.solverLanguage.ModelSymbol;
26import org.eclipse.viatra.solver.language.solverLanguage.Polarity;
27import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage;
28
29/**
30 * <!-- begin-user-doc -->
31 * An implementation of the model object '<em><b>Constraint</b></em>'.
32 * <!-- end-user-doc -->
33 * <p>
34 * The following features are implemented:
35 * </p>
36 * <ul>
37 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ConstraintImpl#getPolarity <em>Polarity</em>}</li>
38 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ConstraintImpl#getSymbol <em>Symbol</em>}</li>
39 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ConstraintImpl#getParams <em>Params</em>}</li>
40 * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.ConstraintImpl#getClosureType <em>Closure Type</em>}</li>
41 * </ul>
42 *
43 * @generated
44 */
45public class ConstraintImpl extends MinimalEObjectImpl.Container implements Constraint
46{
47 /**
48 * The cached value of the '{@link #getPolarity() <em>Polarity</em>}' containment reference.
49 * <!-- begin-user-doc -->
50 * <!-- end-user-doc -->
51 * @see #getPolarity()
52 * @generated
53 * @ordered
54 */
55 protected Polarity polarity;
56
57 /**
58 * The cached value of the '{@link #getSymbol() <em>Symbol</em>}' containment reference.
59 * <!-- begin-user-doc -->
60 * <!-- end-user-doc -->
61 * @see #getSymbol()
62 * @generated
63 * @ordered
64 */
65 protected ModelSymbol symbol;
66
67 /**
68 * The cached value of the '{@link #getParams() <em>Params</em>}' containment reference list.
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @see #getParams()
72 * @generated
73 * @ordered
74 */
75 protected EList<Literal> params;
76
77 /**
78 * The cached value of the '{@link #getClosureType() <em>Closure Type</em>}' containment reference.
79 * <!-- begin-user-doc -->
80 * <!-- end-user-doc -->
81 * @see #getClosureType()
82 * @generated
83 * @ordered
84 */
85 protected ClosureType closureType;
86
87 /**
88 * <!-- begin-user-doc -->
89 * <!-- end-user-doc -->
90 * @generated
91 */
92 protected ConstraintImpl()
93 {
94 super();
95 }
96
97 /**
98 * <!-- begin-user-doc -->
99 * <!-- end-user-doc -->
100 * @generated
101 */
102 @Override
103 protected EClass eStaticClass()
104 {
105 return SolverLanguagePackage.Literals.CONSTRAINT;
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 @Override
114 public Polarity getPolarity()
115 {
116 return polarity;
117 }
118
119 /**
120 * <!-- begin-user-doc -->
121 * <!-- end-user-doc -->
122 * @generated
123 */
124 public NotificationChain basicSetPolarity(Polarity newPolarity, NotificationChain msgs)
125 {
126 Polarity oldPolarity = polarity;
127 polarity = newPolarity;
128 if (eNotificationRequired())
129 {
130 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CONSTRAINT__POLARITY, oldPolarity, newPolarity);
131 if (msgs == null) msgs = notification; else msgs.add(notification);
132 }
133 return msgs;
134 }
135
136 /**
137 * <!-- begin-user-doc -->
138 * <!-- end-user-doc -->
139 * @generated
140 */
141 @Override
142 public void setPolarity(Polarity newPolarity)
143 {
144 if (newPolarity != polarity)
145 {
146 NotificationChain msgs = null;
147 if (polarity != null)
148 msgs = ((InternalEObject)polarity).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CONSTRAINT__POLARITY, null, msgs);
149 if (newPolarity != null)
150 msgs = ((InternalEObject)newPolarity).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CONSTRAINT__POLARITY, null, msgs);
151 msgs = basicSetPolarity(newPolarity, msgs);
152 if (msgs != null) msgs.dispatch();
153 }
154 else if (eNotificationRequired())
155 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CONSTRAINT__POLARITY, newPolarity, newPolarity));
156 }
157
158 /**
159 * <!-- begin-user-doc -->
160 * <!-- end-user-doc -->
161 * @generated
162 */
163 @Override
164 public ModelSymbol getSymbol()
165 {
166 return symbol;
167 }
168
169 /**
170 * <!-- begin-user-doc -->
171 * <!-- end-user-doc -->
172 * @generated
173 */
174 public NotificationChain basicSetSymbol(ModelSymbol newSymbol, NotificationChain msgs)
175 {
176 ModelSymbol oldSymbol = symbol;
177 symbol = newSymbol;
178 if (eNotificationRequired())
179 {
180 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CONSTRAINT__SYMBOL, oldSymbol, newSymbol);
181 if (msgs == null) msgs = notification; else msgs.add(notification);
182 }
183 return msgs;
184 }
185
186 /**
187 * <!-- begin-user-doc -->
188 * <!-- end-user-doc -->
189 * @generated
190 */
191 @Override
192 public void setSymbol(ModelSymbol newSymbol)
193 {
194 if (newSymbol != symbol)
195 {
196 NotificationChain msgs = null;
197 if (symbol != null)
198 msgs = ((InternalEObject)symbol).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CONSTRAINT__SYMBOL, null, msgs);
199 if (newSymbol != null)
200 msgs = ((InternalEObject)newSymbol).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CONSTRAINT__SYMBOL, null, msgs);
201 msgs = basicSetSymbol(newSymbol, msgs);
202 if (msgs != null) msgs.dispatch();
203 }
204 else if (eNotificationRequired())
205 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CONSTRAINT__SYMBOL, newSymbol, newSymbol));
206 }
207
208 /**
209 * <!-- begin-user-doc -->
210 * <!-- end-user-doc -->
211 * @generated
212 */
213 @Override
214 public EList<Literal> getParams()
215 {
216 if (params == null)
217 {
218 params = new EObjectContainmentEList<Literal>(Literal.class, this, SolverLanguagePackage.CONSTRAINT__PARAMS);
219 }
220 return params;
221 }
222
223 /**
224 * <!-- begin-user-doc -->
225 * <!-- end-user-doc -->
226 * @generated
227 */
228 @Override
229 public ClosureType getClosureType()
230 {
231 return closureType;
232 }
233
234 /**
235 * <!-- begin-user-doc -->
236 * <!-- end-user-doc -->
237 * @generated
238 */
239 public NotificationChain basicSetClosureType(ClosureType newClosureType, NotificationChain msgs)
240 {
241 ClosureType oldClosureType = closureType;
242 closureType = newClosureType;
243 if (eNotificationRequired())
244 {
245 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE, oldClosureType, newClosureType);
246 if (msgs == null) msgs = notification; else msgs.add(notification);
247 }
248 return msgs;
249 }
250
251 /**
252 * <!-- begin-user-doc -->
253 * <!-- end-user-doc -->
254 * @generated
255 */
256 @Override
257 public void setClosureType(ClosureType newClosureType)
258 {
259 if (newClosureType != closureType)
260 {
261 NotificationChain msgs = null;
262 if (closureType != null)
263 msgs = ((InternalEObject)closureType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE, null, msgs);
264 if (newClosureType != null)
265 msgs = ((InternalEObject)newClosureType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE, null, msgs);
266 msgs = basicSetClosureType(newClosureType, msgs);
267 if (msgs != null) msgs.dispatch();
268 }
269 else if (eNotificationRequired())
270 eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE, newClosureType, newClosureType));
271 }
272
273 /**
274 * <!-- begin-user-doc -->
275 * <!-- end-user-doc -->
276 * @generated
277 */
278 @Override
279 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
280 {
281 switch (featureID)
282 {
283 case SolverLanguagePackage.CONSTRAINT__POLARITY:
284 return basicSetPolarity(null, msgs);
285 case SolverLanguagePackage.CONSTRAINT__SYMBOL:
286 return basicSetSymbol(null, msgs);
287 case SolverLanguagePackage.CONSTRAINT__PARAMS:
288 return ((InternalEList<?>)getParams()).basicRemove(otherEnd, msgs);
289 case SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE:
290 return basicSetClosureType(null, msgs);
291 }
292 return super.eInverseRemove(otherEnd, featureID, msgs);
293 }
294
295 /**
296 * <!-- begin-user-doc -->
297 * <!-- end-user-doc -->
298 * @generated
299 */
300 @Override
301 public Object eGet(int featureID, boolean resolve, boolean coreType)
302 {
303 switch (featureID)
304 {
305 case SolverLanguagePackage.CONSTRAINT__POLARITY:
306 return getPolarity();
307 case SolverLanguagePackage.CONSTRAINT__SYMBOL:
308 return getSymbol();
309 case SolverLanguagePackage.CONSTRAINT__PARAMS:
310 return getParams();
311 case SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE:
312 return getClosureType();
313 }
314 return super.eGet(featureID, resolve, coreType);
315 }
316
317 /**
318 * <!-- begin-user-doc -->
319 * <!-- end-user-doc -->
320 * @generated
321 */
322 @SuppressWarnings("unchecked")
323 @Override
324 public void eSet(int featureID, Object newValue)
325 {
326 switch (featureID)
327 {
328 case SolverLanguagePackage.CONSTRAINT__POLARITY:
329 setPolarity((Polarity)newValue);
330 return;
331 case SolverLanguagePackage.CONSTRAINT__SYMBOL:
332 setSymbol((ModelSymbol)newValue);
333 return;
334 case SolverLanguagePackage.CONSTRAINT__PARAMS:
335 getParams().clear();
336 getParams().addAll((Collection<? extends Literal>)newValue);
337 return;
338 case SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE:
339 setClosureType((ClosureType)newValue);
340 return;
341 }
342 super.eSet(featureID, newValue);
343 }
344
345 /**
346 * <!-- begin-user-doc -->
347 * <!-- end-user-doc -->
348 * @generated
349 */
350 @Override
351 public void eUnset(int featureID)
352 {
353 switch (featureID)
354 {
355 case SolverLanguagePackage.CONSTRAINT__POLARITY:
356 setPolarity((Polarity)null);
357 return;
358 case SolverLanguagePackage.CONSTRAINT__SYMBOL:
359 setSymbol((ModelSymbol)null);
360 return;
361 case SolverLanguagePackage.CONSTRAINT__PARAMS:
362 getParams().clear();
363 return;
364 case SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE:
365 setClosureType((ClosureType)null);
366 return;
367 }
368 super.eUnset(featureID);
369 }
370
371 /**
372 * <!-- begin-user-doc -->
373 * <!-- end-user-doc -->
374 * @generated
375 */
376 @Override
377 public boolean eIsSet(int featureID)
378 {
379 switch (featureID)
380 {
381 case SolverLanguagePackage.CONSTRAINT__POLARITY:
382 return polarity != null;
383 case SolverLanguagePackage.CONSTRAINT__SYMBOL:
384 return symbol != null;
385 case SolverLanguagePackage.CONSTRAINT__PARAMS:
386 return params != null && !params.isEmpty();
387 case SolverLanguagePackage.CONSTRAINT__CLOSURE_TYPE:
388 return closureType != null;
389 }
390 return super.eIsSet(featureID);
391 }
392
393} //ConstraintImpl