diff options
Diffstat (limited to 'org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java')
-rw-r--r-- | org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java | 262 |
1 files changed, 0 insertions, 262 deletions
diff --git a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java b/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java deleted file mode 100644 index 968b6de1..00000000 --- a/org.eclipse.viatra.solver.language.parent/org.eclipse.viatra.solver.language.model/src/main/emf-gen/org/eclipse/viatra/solver/language/model/problem/impl/PredicateDefinitionImpl.java +++ /dev/null | |||
@@ -1,262 +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 | import org.eclipse.emf.common.notify.NotificationChain; | ||
9 | |||
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 | |||
17 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
18 | import org.eclipse.emf.ecore.util.InternalEList; | ||
19 | |||
20 | import org.eclipse.viatra.solver.language.model.problem.Conjunction; | ||
21 | import org.eclipse.viatra.solver.language.model.problem.Parameter; | ||
22 | import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition; | ||
23 | import org.eclipse.viatra.solver.language.model.problem.ProblemPackage; | ||
24 | |||
25 | /** | ||
26 | * <!-- begin-user-doc --> | ||
27 | * An implementation of the model object '<em><b>Predicate Definition</b></em>'. | ||
28 | * <!-- end-user-doc --> | ||
29 | * <p> | ||
30 | * The following features are implemented: | ||
31 | * </p> | ||
32 | * <ul> | ||
33 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl#isError <em>Error</em>}</li> | ||
34 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl#getParameters <em>Parameters</em>}</li> | ||
35 | * <li>{@link org.eclipse.viatra.solver.language.model.problem.impl.PredicateDefinitionImpl#getBodies <em>Bodies</em>}</li> | ||
36 | * </ul> | ||
37 | * | ||
38 | * @generated | ||
39 | */ | ||
40 | public class PredicateDefinitionImpl extends RelationImpl implements PredicateDefinition { | ||
41 | /** | ||
42 | * The default value of the '{@link #isError() <em>Error</em>}' attribute. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #isError() | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | protected static final boolean ERROR_EDEFAULT = false; | ||
50 | |||
51 | /** | ||
52 | * The cached value of the '{@link #isError() <em>Error</em>}' attribute. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @see #isError() | ||
56 | * @generated | ||
57 | * @ordered | ||
58 | */ | ||
59 | protected boolean error = ERROR_EDEFAULT; | ||
60 | |||
61 | /** | ||
62 | * The cached value of the '{@link #getParameters() <em>Parameters</em>}' containment reference list. | ||
63 | * <!-- begin-user-doc --> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @see #getParameters() | ||
66 | * @generated | ||
67 | * @ordered | ||
68 | */ | ||
69 | protected EList<Parameter> parameters; | ||
70 | |||
71 | /** | ||
72 | * The cached value of the '{@link #getBodies() <em>Bodies</em>}' containment reference list. | ||
73 | * <!-- begin-user-doc --> | ||
74 | * <!-- end-user-doc --> | ||
75 | * @see #getBodies() | ||
76 | * @generated | ||
77 | * @ordered | ||
78 | */ | ||
79 | protected EList<Conjunction> bodies; | ||
80 | |||
81 | /** | ||
82 | * <!-- begin-user-doc --> | ||
83 | * <!-- end-user-doc --> | ||
84 | * @generated | ||
85 | */ | ||
86 | protected PredicateDefinitionImpl() { | ||
87 | super(); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | @Override | ||
96 | protected EClass eStaticClass() { | ||
97 | return ProblemPackage.Literals.PREDICATE_DEFINITION; | ||
98 | } | ||
99 | |||
100 | /** | ||
101 | * <!-- begin-user-doc --> | ||
102 | * <!-- end-user-doc --> | ||
103 | * @generated | ||
104 | */ | ||
105 | public boolean isError() { | ||
106 | return error; | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @generated | ||
113 | */ | ||
114 | public void setError(boolean newError) { | ||
115 | boolean oldError = error; | ||
116 | error = newError; | ||
117 | if (eNotificationRequired()) | ||
118 | eNotify(new ENotificationImpl(this, Notification.SET, ProblemPackage.PREDICATE_DEFINITION__ERROR, oldError, | ||
119 | error)); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | public EList<Parameter> getParameters() { | ||
128 | if (parameters == null) { | ||
129 | parameters = new EObjectContainmentEList<Parameter>(Parameter.class, this, | ||
130 | ProblemPackage.PREDICATE_DEFINITION__PARAMETERS); | ||
131 | } | ||
132 | return parameters; | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | public EList<Conjunction> getBodies() { | ||
141 | if (bodies == null) { | ||
142 | bodies = new EObjectContainmentEList<Conjunction>(Conjunction.class, this, | ||
143 | ProblemPackage.PREDICATE_DEFINITION__BODIES); | ||
144 | } | ||
145 | return bodies; | ||
146 | } | ||
147 | |||
148 | /** | ||
149 | * <!-- begin-user-doc --> | ||
150 | * <!-- end-user-doc --> | ||
151 | * @generated | ||
152 | */ | ||
153 | @Override | ||
154 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
155 | switch (featureID) { | ||
156 | case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: | ||
157 | return ((InternalEList<?>) getParameters()).basicRemove(otherEnd, msgs); | ||
158 | case ProblemPackage.PREDICATE_DEFINITION__BODIES: | ||
159 | return ((InternalEList<?>) getBodies()).basicRemove(otherEnd, msgs); | ||
160 | } | ||
161 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | @Override | ||
170 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
171 | switch (featureID) { | ||
172 | case ProblemPackage.PREDICATE_DEFINITION__ERROR: | ||
173 | return isError(); | ||
174 | case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: | ||
175 | return getParameters(); | ||
176 | case ProblemPackage.PREDICATE_DEFINITION__BODIES: | ||
177 | return getBodies(); | ||
178 | } | ||
179 | return super.eGet(featureID, resolve, coreType); | ||
180 | } | ||
181 | |||
182 | /** | ||
183 | * <!-- begin-user-doc --> | ||
184 | * <!-- end-user-doc --> | ||
185 | * @generated | ||
186 | */ | ||
187 | @SuppressWarnings("unchecked") | ||
188 | @Override | ||
189 | public void eSet(int featureID, Object newValue) { | ||
190 | switch (featureID) { | ||
191 | case ProblemPackage.PREDICATE_DEFINITION__ERROR: | ||
192 | setError((Boolean) newValue); | ||
193 | return; | ||
194 | case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: | ||
195 | getParameters().clear(); | ||
196 | getParameters().addAll((Collection<? extends Parameter>) newValue); | ||
197 | return; | ||
198 | case ProblemPackage.PREDICATE_DEFINITION__BODIES: | ||
199 | getBodies().clear(); | ||
200 | getBodies().addAll((Collection<? extends Conjunction>) newValue); | ||
201 | return; | ||
202 | } | ||
203 | super.eSet(featureID, newValue); | ||
204 | } | ||
205 | |||
206 | /** | ||
207 | * <!-- begin-user-doc --> | ||
208 | * <!-- end-user-doc --> | ||
209 | * @generated | ||
210 | */ | ||
211 | @Override | ||
212 | public void eUnset(int featureID) { | ||
213 | switch (featureID) { | ||
214 | case ProblemPackage.PREDICATE_DEFINITION__ERROR: | ||
215 | setError(ERROR_EDEFAULT); | ||
216 | return; | ||
217 | case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: | ||
218 | getParameters().clear(); | ||
219 | return; | ||
220 | case ProblemPackage.PREDICATE_DEFINITION__BODIES: | ||
221 | getBodies().clear(); | ||
222 | return; | ||
223 | } | ||
224 | super.eUnset(featureID); | ||
225 | } | ||
226 | |||
227 | /** | ||
228 | * <!-- begin-user-doc --> | ||
229 | * <!-- end-user-doc --> | ||
230 | * @generated | ||
231 | */ | ||
232 | @Override | ||
233 | public boolean eIsSet(int featureID) { | ||
234 | switch (featureID) { | ||
235 | case ProblemPackage.PREDICATE_DEFINITION__ERROR: | ||
236 | return error != ERROR_EDEFAULT; | ||
237 | case ProblemPackage.PREDICATE_DEFINITION__PARAMETERS: | ||
238 | return parameters != null && !parameters.isEmpty(); | ||
239 | case ProblemPackage.PREDICATE_DEFINITION__BODIES: | ||
240 | return bodies != null && !bodies.isEmpty(); | ||
241 | } | ||
242 | return super.eIsSet(featureID); | ||
243 | } | ||
244 | |||
245 | /** | ||
246 | * <!-- begin-user-doc --> | ||
247 | * <!-- end-user-doc --> | ||
248 | * @generated | ||
249 | */ | ||
250 | @Override | ||
251 | public String toString() { | ||
252 | if (eIsProxy()) | ||
253 | return super.toString(); | ||
254 | |||
255 | StringBuilder result = new StringBuilder(super.toString()); | ||
256 | result.append(" (error: "); | ||
257 | result.append(error); | ||
258 | result.append(')'); | ||
259 | return result.toString(); | ||
260 | } | ||
261 | |||
262 | } //PredicateDefinitionImpl | ||