diff options
author | 2020-04-28 20:43:04 +0200 | |
---|---|---|
committer | 2020-04-28 20:43:04 +0200 | |
commit | 8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe (patch) | |
tree | d525bef75519f364d637e0779f8e63d4199dee31 /Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MultiplicityDefinitionImpl.java | |
parent | check expressions are mapped to WF constraints (diff) | |
download | VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.gz VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.zst VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.zip |
initial commit
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MultiplicityDefinitionImpl.java')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MultiplicityDefinitionImpl.java | 296 |
1 files changed, 296 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MultiplicityDefinitionImpl.java b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MultiplicityDefinitionImpl.java new file mode 100644 index 00000000..a346568c --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language/src-gen/org/eclipse/viatra/solver/language/solverLanguage/impl/MultiplicityDefinitionImpl.java | |||
@@ -0,0 +1,296 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.solverLanguage.impl; | ||
5 | |||
6 | import org.eclipse.emf.common.notify.Notification; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
11 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
12 | |||
13 | import org.eclipse.viatra.solver.language.solverLanguage.MultiplicityDefinition; | ||
14 | import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; | ||
15 | |||
16 | /** | ||
17 | * <!-- begin-user-doc --> | ||
18 | * An implementation of the model object '<em><b>Multiplicity Definition</b></em>'. | ||
19 | * <!-- end-user-doc --> | ||
20 | * <p> | ||
21 | * The following features are implemented: | ||
22 | * </p> | ||
23 | * <ul> | ||
24 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.MultiplicityDefinitionImpl#getLower <em>Lower</em>}</li> | ||
25 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.MultiplicityDefinitionImpl#getUpper <em>Upper</em>}</li> | ||
26 | * <li>{@link org.eclipse.viatra.solver.language.solverLanguage.impl.MultiplicityDefinitionImpl#isUnlimitedUpper <em>Unlimited Upper</em>}</li> | ||
27 | * </ul> | ||
28 | * | ||
29 | * @generated | ||
30 | */ | ||
31 | public class MultiplicityDefinitionImpl extends MinimalEObjectImpl.Container implements MultiplicityDefinition | ||
32 | { | ||
33 | /** | ||
34 | * The default value of the '{@link #getLower() <em>Lower</em>}' attribute. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @see #getLower() | ||
38 | * @generated | ||
39 | * @ordered | ||
40 | */ | ||
41 | protected static final int LOWER_EDEFAULT = 0; | ||
42 | |||
43 | /** | ||
44 | * The cached value of the '{@link #getLower() <em>Lower</em>}' attribute. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getLower() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected int lower = LOWER_EDEFAULT; | ||
52 | |||
53 | /** | ||
54 | * The default value of the '{@link #getUpper() <em>Upper</em>}' attribute. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @see #getUpper() | ||
58 | * @generated | ||
59 | * @ordered | ||
60 | */ | ||
61 | protected static final int UPPER_EDEFAULT = 0; | ||
62 | |||
63 | /** | ||
64 | * The cached value of the '{@link #getUpper() <em>Upper</em>}' attribute. | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @see #getUpper() | ||
68 | * @generated | ||
69 | * @ordered | ||
70 | */ | ||
71 | protected int upper = UPPER_EDEFAULT; | ||
72 | |||
73 | /** | ||
74 | * The default value of the '{@link #isUnlimitedUpper() <em>Unlimited Upper</em>}' attribute. | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <!-- end-user-doc --> | ||
77 | * @see #isUnlimitedUpper() | ||
78 | * @generated | ||
79 | * @ordered | ||
80 | */ | ||
81 | protected static final boolean UNLIMITED_UPPER_EDEFAULT = false; | ||
82 | |||
83 | /** | ||
84 | * The cached value of the '{@link #isUnlimitedUpper() <em>Unlimited Upper</em>}' attribute. | ||
85 | * <!-- begin-user-doc --> | ||
86 | * <!-- end-user-doc --> | ||
87 | * @see #isUnlimitedUpper() | ||
88 | * @generated | ||
89 | * @ordered | ||
90 | */ | ||
91 | protected boolean unlimitedUpper = UNLIMITED_UPPER_EDEFAULT; | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | protected MultiplicityDefinitionImpl() | ||
99 | { | ||
100 | super(); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | @Override | ||
109 | protected EClass eStaticClass() | ||
110 | { | ||
111 | return SolverLanguagePackage.Literals.MULTIPLICITY_DEFINITION; | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public int getLower() | ||
121 | { | ||
122 | return lower; | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @generated | ||
129 | */ | ||
130 | @Override | ||
131 | public void setLower(int newLower) | ||
132 | { | ||
133 | int oldLower = lower; | ||
134 | lower = newLower; | ||
135 | if (eNotificationRequired()) | ||
136 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.MULTIPLICITY_DEFINITION__LOWER, oldLower, lower)); | ||
137 | } | ||
138 | |||
139 | /** | ||
140 | * <!-- begin-user-doc --> | ||
141 | * <!-- end-user-doc --> | ||
142 | * @generated | ||
143 | */ | ||
144 | @Override | ||
145 | public int getUpper() | ||
146 | { | ||
147 | return upper; | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * <!-- begin-user-doc --> | ||
152 | * <!-- end-user-doc --> | ||
153 | * @generated | ||
154 | */ | ||
155 | @Override | ||
156 | public void setUpper(int newUpper) | ||
157 | { | ||
158 | int oldUpper = upper; | ||
159 | upper = newUpper; | ||
160 | if (eNotificationRequired()) | ||
161 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.MULTIPLICITY_DEFINITION__UPPER, oldUpper, upper)); | ||
162 | } | ||
163 | |||
164 | /** | ||
165 | * <!-- begin-user-doc --> | ||
166 | * <!-- end-user-doc --> | ||
167 | * @generated | ||
168 | */ | ||
169 | @Override | ||
170 | public boolean isUnlimitedUpper() | ||
171 | { | ||
172 | return unlimitedUpper; | ||
173 | } | ||
174 | |||
175 | /** | ||
176 | * <!-- begin-user-doc --> | ||
177 | * <!-- end-user-doc --> | ||
178 | * @generated | ||
179 | */ | ||
180 | @Override | ||
181 | public void setUnlimitedUpper(boolean newUnlimitedUpper) | ||
182 | { | ||
183 | boolean oldUnlimitedUpper = unlimitedUpper; | ||
184 | unlimitedUpper = newUnlimitedUpper; | ||
185 | if (eNotificationRequired()) | ||
186 | eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.MULTIPLICITY_DEFINITION__UNLIMITED_UPPER, oldUnlimitedUpper, unlimitedUpper)); | ||
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 | { | ||
197 | switch (featureID) | ||
198 | { | ||
199 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__LOWER: | ||
200 | return getLower(); | ||
201 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__UPPER: | ||
202 | return getUpper(); | ||
203 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__UNLIMITED_UPPER: | ||
204 | return isUnlimitedUpper(); | ||
205 | } | ||
206 | return super.eGet(featureID, resolve, coreType); | ||
207 | } | ||
208 | |||
209 | /** | ||
210 | * <!-- begin-user-doc --> | ||
211 | * <!-- end-user-doc --> | ||
212 | * @generated | ||
213 | */ | ||
214 | @Override | ||
215 | public void eSet(int featureID, Object newValue) | ||
216 | { | ||
217 | switch (featureID) | ||
218 | { | ||
219 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__LOWER: | ||
220 | setLower((Integer)newValue); | ||
221 | return; | ||
222 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__UPPER: | ||
223 | setUpper((Integer)newValue); | ||
224 | return; | ||
225 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__UNLIMITED_UPPER: | ||
226 | setUnlimitedUpper((Boolean)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 | { | ||
240 | switch (featureID) | ||
241 | { | ||
242 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__LOWER: | ||
243 | setLower(LOWER_EDEFAULT); | ||
244 | return; | ||
245 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__UPPER: | ||
246 | setUpper(UPPER_EDEFAULT); | ||
247 | return; | ||
248 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__UNLIMITED_UPPER: | ||
249 | setUnlimitedUpper(UNLIMITED_UPPER_EDEFAULT); | ||
250 | return; | ||
251 | } | ||
252 | super.eUnset(featureID); | ||
253 | } | ||
254 | |||
255 | /** | ||
256 | * <!-- begin-user-doc --> | ||
257 | * <!-- end-user-doc --> | ||
258 | * @generated | ||
259 | */ | ||
260 | @Override | ||
261 | public boolean eIsSet(int featureID) | ||
262 | { | ||
263 | switch (featureID) | ||
264 | { | ||
265 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__LOWER: | ||
266 | return lower != LOWER_EDEFAULT; | ||
267 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__UPPER: | ||
268 | return upper != UPPER_EDEFAULT; | ||
269 | case SolverLanguagePackage.MULTIPLICITY_DEFINITION__UNLIMITED_UPPER: | ||
270 | return unlimitedUpper != UNLIMITED_UPPER_EDEFAULT; | ||
271 | } | ||
272 | return super.eIsSet(featureID); | ||
273 | } | ||
274 | |||
275 | /** | ||
276 | * <!-- begin-user-doc --> | ||
277 | * <!-- end-user-doc --> | ||
278 | * @generated | ||
279 | */ | ||
280 | @Override | ||
281 | public String toString() | ||
282 | { | ||
283 | if (eIsProxy()) return super.toString(); | ||
284 | |||
285 | StringBuilder result = new StringBuilder(super.toString()); | ||
286 | result.append(" (lower: "); | ||
287 | result.append(lower); | ||
288 | result.append(", upper: "); | ||
289 | result.append(upper); | ||
290 | result.append(", unlimitedUpper: "); | ||
291 | result.append(unlimitedUpper); | ||
292 | result.append(')'); | ||
293 | return result.toString(); | ||
294 | } | ||
295 | |||
296 | } //MultiplicityDefinitionImpl | ||