diff options
Diffstat (limited to 'language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java')
-rw-r--r-- | language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java | 288 |
1 files changed, 0 insertions, 288 deletions
diff --git a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java b/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java deleted file mode 100644 index 2567d57b..00000000 --- a/language-model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/AssertionImpl.java +++ /dev/null | |||
@@ -1,288 +0,0 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package org.eclipse.viatra.solver.language.model.problem.impl; | ||
4 | |||
5 | import java.util.Collection; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Notification; | ||
8 | |||
9 | import org.eclipse.emf.common.notify.NotificationChain; | ||
10 | import org.eclipse.emf.common.util.EList; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
19 | import org.eclipse.emf.ecore.util.InternalEList; | ||
20 | import org.eclipse.viatra.solver.language.model.problem.Assertion; | ||
21 | import org.eclipse.viatra.solver.language.model.problem.AssertionArgument; | ||
22 | import org.eclipse.viatra.solver.language.model.problem.LogicValue; | ||
23 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
24 | import org.eclipse.viatra.solver.language.model.problem.Relation; | ||
25 | |||
26 | /** | ||
27 | * <!-- begin-user-doc --> | ||
28 | * An implementation of the model object '<em><b>Assertion</b></em>'. | ||
29 | * <!-- end-user-doc --> | ||
30 | * <p> | ||
31 | * The following features are implemented: | ||
32 | * </p> | ||
33 | * <ul> | ||
34 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getRelation <em>Relation</em>}</li> | ||
35 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getValue <em>Value</em>}</li> | ||
36 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.AssertionImpl#getArguments <em>Arguments</em>}</li> | ||
37 | * </ul> | ||
38 | * | ||
39 | * @generated | ||
40 | */ | ||
41 | public class AssertionImpl extends MinimalEObjectImpl.Container implements Assertion { | ||
42 | /** | ||
43 | * The cached value of the '{@link #getRelation() <em>Relation</em>}' reference. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @see #getRelation() | ||
47 | * @generated | ||
48 | * @ordered | ||
49 | */ | ||
50 | protected Relation relation; | ||
51 | |||
52 | /** | ||
53 | * The default value of the '{@link #getValue() <em>Value</em>}' attribute. | ||
54 | * <!-- begin-user-doc --> | ||
55 | * <!-- end-user-doc --> | ||
56 | * @see #getValue() | ||
57 | * @generated | ||
58 | * @ordered | ||
59 | */ | ||
60 | protected static final LogicValue VALUE_EDEFAULT = LogicValue.TRUE; | ||
61 | |||
62 | /** | ||
63 | * The cached value of the '{@link #getValue() <em>Value</em>}' attribute. | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @see #getValue() | ||
67 | * @generated | ||
68 | * @ordered | ||
69 | */ | ||
70 | protected LogicValue value = VALUE_EDEFAULT; | ||
71 | |||
72 | /** | ||
73 | * The cached value of the '{@link #getArguments() <em>Arguments</em>}' containment reference list. | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @see #getArguments() | ||
77 | * @generated | ||
78 | * @ordered | ||
79 | */ | ||
80 | protected EList<AssertionArgument> arguments; | ||
81 | |||
82 | /** | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <!-- end-user-doc --> | ||
85 | * @generated | ||
86 | */ | ||
87 | protected AssertionImpl() { | ||
88 | super(); | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | protected EClass eStaticClass() { | ||
98 | return ProblemPackage.Literals.ASSERTION; | ||
99 | } | ||
100 | |||
101 | /** | ||
102 | * <!-- begin-user-doc --> | ||
103 | * <!-- end-user-doc --> | ||
104 | * @generated | ||
105 | */ | ||
106 | public Relation getRelation() { | ||
107 | if (relation != null && relation.eIsProxy()) { | ||
108 | InternalEObject oldRelation = (InternalEObject) relation; | ||
109 | relation = (Relation) eResolveProxy(oldRelation); | ||
110 | if (relation != oldRelation) { | ||
111 | if (eNotificationRequired()) | ||
112 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProblemPackage.ASSERTION__RELATION, | ||
113 | oldRelation, relation)); | ||
114 | } | ||
115 | } | ||
116 | return relation; | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | public Relation basicGetRelation() { | ||
125 | return relation; | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * <!-- begin-user-doc --> | ||
130 | * <!-- end-user-doc --> | ||
131 | * @generated | ||
132 | */ | ||
133 | public void setRelation(Relation newRelation) { | ||
134 | Relation oldRelation = relation; | ||
135 | relation = newRelation; | ||
136 | if (eNotificationRequired()) | ||
137 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ASSERTION__RELATION, oldRelation, | ||
138 | relation)); | ||
139 | } | ||
140 | |||
141 | /** | ||
142 | * <!-- begin-user-doc --> | ||
143 | * <!-- end-user-doc --> | ||
144 | * @generated | ||
145 | */ | ||
146 | public EList<AssertionArgument> getArguments() { | ||
147 | if (arguments == null) { | ||
148 | arguments = new EObjectContainmentEList<AssertionArgument>(AssertionArgument.class, this, | ||
149 | ProblemPackage.ASSERTION__ARGUMENTS); | ||
150 | } | ||
151 | return arguments; | ||
152 | } | ||
153 | |||
154 | /** | ||
155 | * <!-- begin-user-doc --> | ||
156 | * <!-- end-user-doc --> | ||
157 | * @generated | ||
158 | */ | ||
159 | @Override | ||
160 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
161 | switch (featureID) { | ||
162 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
163 | return ((InternalEList<?>) getArguments()).basicRemove(otherEnd, msgs); | ||
164 | } | ||
165 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | public LogicValue getValue() { | ||
174 | return value; | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | public void setValue(LogicValue newValue) { | ||
183 | LogicValue oldValue = value; | ||
184 | value = newValue == null ? VALUE_EDEFAULT : newValue; | ||
185 | if (eNotificationRequired()) | ||
186 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.ASSERTION__VALUE, oldValue, value)); | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * <!-- begin-user-doc --> | ||
191 | * <!-- end-user-doc --> | ||
192 | * @generated | ||
193 | */ | ||
194 | @Override | ||
195 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
196 | switch (featureID) { | ||
197 | case ProblemPackage.ASSERTION__RELATION: | ||
198 | if (resolve) | ||
199 | return getRelation(); | ||
200 | return basicGetRelation(); | ||
201 | case ProblemPackage.ASSERTION__VALUE: | ||
202 | return getValue(); | ||
203 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
204 | return getArguments(); | ||
205 | } | ||
206 | return super.eGet(featureID, resolve, coreType); | ||
207 | } | ||
208 | |||
209 | /** | ||
210 | * <!-- begin-user-doc --> | ||
211 | * <!-- end-user-doc --> | ||
212 | * @generated | ||
213 | */ | ||
214 | @SuppressWarnings("unchecked") | ||
215 | @Override | ||
216 | public void eSet(int featureID, Object newValue) { | ||
217 | switch (featureID) { | ||
218 | case ProblemPackage.ASSERTION__RELATION: | ||
219 | setRelation((Relation) newValue); | ||
220 | return; | ||
221 | case ProblemPackage.ASSERTION__VALUE: | ||
222 | setValue((LogicValue) newValue); | ||
223 | return; | ||
224 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
225 | getArguments().clear(); | ||
226 | getArguments().addAll((Collection<? extends AssertionArgument>) newValue); | ||
227 | return; | ||
228 | } | ||
229 | super.eSet(featureID, newValue); | ||
230 | } | ||
231 | |||
232 | /** | ||
233 | * <!-- begin-user-doc --> | ||
234 | * <!-- end-user-doc --> | ||
235 | * @generated | ||
236 | */ | ||
237 | @Override | ||
238 | public void eUnset(int featureID) { | ||
239 | switch (featureID) { | ||
240 | case ProblemPackage.ASSERTION__RELATION: | ||
241 | setRelation((Relation) null); | ||
242 | return; | ||
243 | case ProblemPackage.ASSERTION__VALUE: | ||
244 | setValue(VALUE_EDEFAULT); | ||
245 | return; | ||
246 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
247 | getArguments().clear(); | ||
248 | return; | ||
249 | } | ||
250 | super.eUnset(featureID); | ||
251 | } | ||
252 | |||
253 | /** | ||
254 | * <!-- begin-user-doc --> | ||
255 | * <!-- end-user-doc --> | ||
256 | * @generated | ||
257 | */ | ||
258 | @Override | ||
259 | public boolean eIsSet(int featureID) { | ||
260 | switch (featureID) { | ||
261 | case ProblemPackage.ASSERTION__RELATION: | ||
262 | return relation != null; | ||
263 | case ProblemPackage.ASSERTION__VALUE: | ||
264 | return value != VALUE_EDEFAULT; | ||
265 | case ProblemPackage.ASSERTION__ARGUMENTS: | ||
266 | return arguments != null && !arguments.isEmpty(); | ||
267 | } | ||
268 | return super.eIsSet(featureID); | ||
269 | } | ||
270 | |||
271 | /** | ||
272 | * <!-- begin-user-doc --> | ||
273 | * <!-- end-user-doc --> | ||
274 | * @generated | ||
275 | */ | ||
276 | @Override | ||
277 | public String toString() { | ||
278 | if (eIsProxy()) | ||
279 | return super.toString(); | ||
280 | |||
281 | StringBuilder result = new StringBuilder(super.toString()); | ||
282 | result.append(" (value: "); | ||
283 | result.append(value); | ||
284 | result.append(')'); | ||
285 | return result.toString(); | ||
286 | } | ||
287 | |||
288 | } //AssertionImpl | ||