aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PayerImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PayerImpl.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PayerImpl.java355
1 files changed, 355 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PayerImpl.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PayerImpl.java
new file mode 100644
index 00000000..3783701a
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Tax_PayerImpl.java
@@ -0,0 +1,355 @@
1/**
2 */
3package TaxationWithRoot.impl;
4
5import TaxationWithRoot.Dependent;
6import TaxationWithRoot.FromAgent;
7import TaxationWithRoot.FromLaw;
8import TaxationWithRoot.Income;
9import TaxationWithRoot.Tax_Payer;
10import TaxationWithRoot.TaxationWithRootPackage;
11
12import java.util.Collection;
13
14import org.eclipse.emf.common.notify.Notification;
15import org.eclipse.emf.common.notify.NotificationChain;
16
17import org.eclipse.emf.common.util.EList;
18
19import org.eclipse.emf.ecore.EClass;
20import org.eclipse.emf.ecore.InternalEObject;
21
22import org.eclipse.emf.ecore.impl.ENotificationImpl;
23
24import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
25import org.eclipse.emf.ecore.util.InternalEList;
26
27/**
28 * <!-- begin-user-doc -->
29 * An implementation of the model object '<em><b>Tax Payer</b></em>'.
30 * <!-- end-user-doc -->
31 * <p>
32 * The following features are implemented:
33 * </p>
34 * <ul>
35 * <li>{@link TaxationWithRoot.impl.Tax_PayerImpl#getDependents <em>Dependents</em>}</li>
36 * <li>{@link TaxationWithRoot.impl.Tax_PayerImpl#getFrom_agent <em>From agent</em>}</li>
37 * <li>{@link TaxationWithRoot.impl.Tax_PayerImpl#getIncomes <em>Incomes</em>}</li>
38 * <li>{@link TaxationWithRoot.impl.Tax_PayerImpl#getFrom_law <em>From law</em>}</li>
39 * </ul>
40 *
41 * @generated
42 */
43public abstract class Tax_PayerImpl extends Physical_PersonImpl implements Tax_Payer {
44 /**
45 * The cached value of the '{@link #getDependents() <em>Dependents</em>}' containment reference list.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @see #getDependents()
49 * @generated
50 * @ordered
51 */
52 protected EList<Dependent> dependents;
53
54 /**
55 * The cached value of the '{@link #getFrom_agent() <em>From agent</em>}' containment reference.
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @see #getFrom_agent()
59 * @generated
60 * @ordered
61 */
62 protected FromAgent from_agent;
63
64 /**
65 * The cached value of the '{@link #getIncomes() <em>Incomes</em>}' containment reference list.
66 * <!-- begin-user-doc -->
67 * <!-- end-user-doc -->
68 * @see #getIncomes()
69 * @generated
70 * @ordered
71 */
72 protected EList<Income> incomes;
73
74 /**
75 * The cached value of the '{@link #getFrom_law() <em>From law</em>}' containment reference.
76 * <!-- begin-user-doc -->
77 * <!-- end-user-doc -->
78 * @see #getFrom_law()
79 * @generated
80 * @ordered
81 */
82 protected FromLaw from_law;
83
84 /**
85 * <!-- begin-user-doc -->
86 * <!-- end-user-doc -->
87 * @generated
88 */
89 protected Tax_PayerImpl() {
90 super();
91 }
92
93 /**
94 * <!-- begin-user-doc -->
95 * <!-- end-user-doc -->
96 * @generated
97 */
98 @Override
99 protected EClass eStaticClass() {
100 return TaxationWithRootPackage.Literals.TAX_PAYER;
101 }
102
103 /**
104 * <!-- begin-user-doc -->
105 * <!-- end-user-doc -->
106 * @generated
107 */
108 @Override
109 public EList<Dependent> getDependents() {
110 if (dependents == null) {
111 dependents = new EObjectContainmentWithInverseEList<Dependent>(Dependent.class, this, TaxationWithRootPackage.TAX_PAYER__DEPENDENTS, TaxationWithRootPackage.DEPENDENT__RESPONSIBLE_PERSON);
112 }
113 return dependents;
114 }
115
116 /**
117 * <!-- begin-user-doc -->
118 * <!-- end-user-doc -->
119 * @generated
120 */
121 @Override
122 public FromAgent getFrom_agent() {
123 return from_agent;
124 }
125
126 /**
127 * <!-- begin-user-doc -->
128 * <!-- end-user-doc -->
129 * @generated
130 */
131 public NotificationChain basicSetFrom_agent(FromAgent newFrom_agent, NotificationChain msgs) {
132 FromAgent oldFrom_agent = from_agent;
133 from_agent = newFrom_agent;
134 if (eNotificationRequired()) {
135 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.TAX_PAYER__FROM_AGENT, oldFrom_agent, newFrom_agent);
136 if (msgs == null) msgs = notification; else msgs.add(notification);
137 }
138 return msgs;
139 }
140
141 /**
142 * <!-- begin-user-doc -->
143 * <!-- end-user-doc -->
144 * @generated
145 */
146 @Override
147 public void setFrom_agent(FromAgent newFrom_agent) {
148 if (newFrom_agent != from_agent) {
149 NotificationChain msgs = null;
150 if (from_agent != null)
151 msgs = ((InternalEObject)from_agent).eInverseRemove(this, TaxationWithRootPackage.FROM_AGENT__TAX_PAYER, FromAgent.class, msgs);
152 if (newFrom_agent != null)
153 msgs = ((InternalEObject)newFrom_agent).eInverseAdd(this, TaxationWithRootPackage.FROM_AGENT__TAX_PAYER, FromAgent.class, msgs);
154 msgs = basicSetFrom_agent(newFrom_agent, msgs);
155 if (msgs != null) msgs.dispatch();
156 }
157 else if (eNotificationRequired())
158 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.TAX_PAYER__FROM_AGENT, newFrom_agent, newFrom_agent));
159 }
160
161 /**
162 * <!-- begin-user-doc -->
163 * <!-- end-user-doc -->
164 * @generated
165 */
166 @Override
167 public EList<Income> getIncomes() {
168 if (incomes == null) {
169 incomes = new EObjectContainmentWithInverseEList<Income>(Income.class, this, TaxationWithRootPackage.TAX_PAYER__INCOMES, TaxationWithRootPackage.INCOME__TAX_PAYER);
170 }
171 return incomes;
172 }
173
174 /**
175 * <!-- begin-user-doc -->
176 * <!-- end-user-doc -->
177 * @generated
178 */
179 @Override
180 public FromLaw getFrom_law() {
181 return from_law;
182 }
183
184 /**
185 * <!-- begin-user-doc -->
186 * <!-- end-user-doc -->
187 * @generated
188 */
189 public NotificationChain basicSetFrom_law(FromLaw newFrom_law, NotificationChain msgs) {
190 FromLaw oldFrom_law = from_law;
191 from_law = newFrom_law;
192 if (eNotificationRequired()) {
193 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.TAX_PAYER__FROM_LAW, oldFrom_law, newFrom_law);
194 if (msgs == null) msgs = notification; else msgs.add(notification);
195 }
196 return msgs;
197 }
198
199 /**
200 * <!-- begin-user-doc -->
201 * <!-- end-user-doc -->
202 * @generated
203 */
204 @Override
205 public void setFrom_law(FromLaw newFrom_law) {
206 if (newFrom_law != from_law) {
207 NotificationChain msgs = null;
208 if (from_law != null)
209 msgs = ((InternalEObject)from_law).eInverseRemove(this, TaxationWithRootPackage.FROM_LAW__TAX_PAYER, FromLaw.class, msgs);
210 if (newFrom_law != null)
211 msgs = ((InternalEObject)newFrom_law).eInverseAdd(this, TaxationWithRootPackage.FROM_LAW__TAX_PAYER, FromLaw.class, msgs);
212 msgs = basicSetFrom_law(newFrom_law, msgs);
213 if (msgs != null) msgs.dispatch();
214 }
215 else if (eNotificationRequired())
216 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.TAX_PAYER__FROM_LAW, newFrom_law, newFrom_law));
217 }
218
219 /**
220 * <!-- begin-user-doc -->
221 * <!-- end-user-doc -->
222 * @generated
223 */
224 @SuppressWarnings("unchecked")
225 @Override
226 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
227 switch (featureID) {
228 case TaxationWithRootPackage.TAX_PAYER__DEPENDENTS:
229 return ((InternalEList<InternalEObject>)(InternalEList<?>)getDependents()).basicAdd(otherEnd, msgs);
230 case TaxationWithRootPackage.TAX_PAYER__FROM_AGENT:
231 if (from_agent != null)
232 msgs = ((InternalEObject)from_agent).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaxationWithRootPackage.TAX_PAYER__FROM_AGENT, null, msgs);
233 return basicSetFrom_agent((FromAgent)otherEnd, msgs);
234 case TaxationWithRootPackage.TAX_PAYER__INCOMES:
235 return ((InternalEList<InternalEObject>)(InternalEList<?>)getIncomes()).basicAdd(otherEnd, msgs);
236 case TaxationWithRootPackage.TAX_PAYER__FROM_LAW:
237 if (from_law != null)
238 msgs = ((InternalEObject)from_law).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaxationWithRootPackage.TAX_PAYER__FROM_LAW, null, msgs);
239 return basicSetFrom_law((FromLaw)otherEnd, msgs);
240 }
241 return super.eInverseAdd(otherEnd, featureID, msgs);
242 }
243
244 /**
245 * <!-- begin-user-doc -->
246 * <!-- end-user-doc -->
247 * @generated
248 */
249 @Override
250 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
251 switch (featureID) {
252 case TaxationWithRootPackage.TAX_PAYER__DEPENDENTS:
253 return ((InternalEList<?>)getDependents()).basicRemove(otherEnd, msgs);
254 case TaxationWithRootPackage.TAX_PAYER__FROM_AGENT:
255 return basicSetFrom_agent(null, msgs);
256 case TaxationWithRootPackage.TAX_PAYER__INCOMES:
257 return ((InternalEList<?>)getIncomes()).basicRemove(otherEnd, msgs);
258 case TaxationWithRootPackage.TAX_PAYER__FROM_LAW:
259 return basicSetFrom_law(null, msgs);
260 }
261 return super.eInverseRemove(otherEnd, featureID, msgs);
262 }
263
264 /**
265 * <!-- begin-user-doc -->
266 * <!-- end-user-doc -->
267 * @generated
268 */
269 @Override
270 public Object eGet(int featureID, boolean resolve, boolean coreType) {
271 switch (featureID) {
272 case TaxationWithRootPackage.TAX_PAYER__DEPENDENTS:
273 return getDependents();
274 case TaxationWithRootPackage.TAX_PAYER__FROM_AGENT:
275 return getFrom_agent();
276 case TaxationWithRootPackage.TAX_PAYER__INCOMES:
277 return getIncomes();
278 case TaxationWithRootPackage.TAX_PAYER__FROM_LAW:
279 return getFrom_law();
280 }
281 return super.eGet(featureID, resolve, coreType);
282 }
283
284 /**
285 * <!-- begin-user-doc -->
286 * <!-- end-user-doc -->
287 * @generated
288 */
289 @SuppressWarnings("unchecked")
290 @Override
291 public void eSet(int featureID, Object newValue) {
292 switch (featureID) {
293 case TaxationWithRootPackage.TAX_PAYER__DEPENDENTS:
294 getDependents().clear();
295 getDependents().addAll((Collection<? extends Dependent>)newValue);
296 return;
297 case TaxationWithRootPackage.TAX_PAYER__FROM_AGENT:
298 setFrom_agent((FromAgent)newValue);
299 return;
300 case TaxationWithRootPackage.TAX_PAYER__INCOMES:
301 getIncomes().clear();
302 getIncomes().addAll((Collection<? extends Income>)newValue);
303 return;
304 case TaxationWithRootPackage.TAX_PAYER__FROM_LAW:
305 setFrom_law((FromLaw)newValue);
306 return;
307 }
308 super.eSet(featureID, newValue);
309 }
310
311 /**
312 * <!-- begin-user-doc -->
313 * <!-- end-user-doc -->
314 * @generated
315 */
316 @Override
317 public void eUnset(int featureID) {
318 switch (featureID) {
319 case TaxationWithRootPackage.TAX_PAYER__DEPENDENTS:
320 getDependents().clear();
321 return;
322 case TaxationWithRootPackage.TAX_PAYER__FROM_AGENT:
323 setFrom_agent((FromAgent)null);
324 return;
325 case TaxationWithRootPackage.TAX_PAYER__INCOMES:
326 getIncomes().clear();
327 return;
328 case TaxationWithRootPackage.TAX_PAYER__FROM_LAW:
329 setFrom_law((FromLaw)null);
330 return;
331 }
332 super.eUnset(featureID);
333 }
334
335 /**
336 * <!-- begin-user-doc -->
337 * <!-- end-user-doc -->
338 * @generated
339 */
340 @Override
341 public boolean eIsSet(int featureID) {
342 switch (featureID) {
343 case TaxationWithRootPackage.TAX_PAYER__DEPENDENTS:
344 return dependents != null && !dependents.isEmpty();
345 case TaxationWithRootPackage.TAX_PAYER__FROM_AGENT:
346 return from_agent != null;
347 case TaxationWithRootPackage.TAX_PAYER__INCOMES:
348 return incomes != null && !incomes.isEmpty();
349 case TaxationWithRootPackage.TAX_PAYER__FROM_LAW:
350 return from_law != null;
351 }
352 return super.eIsSet(featureID);
353 }
354
355} //Tax_PayerImpl