aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/ExpenseImpl.java
blob: bab7796da5311a5f95020bd2c8ff2e06e4e88531 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
/**
 */
package TaxationWithRoot.impl;

import TaxationWithRoot.Dependent;
import TaxationWithRoot.Expense;
import TaxationWithRoot.Expense_Purpose;
import TaxationWithRoot.FromAgent;
import TaxationWithRoot.Income;
import TaxationWithRoot.Physical_Person;
import TaxationWithRoot.TaxationWithRootPackage;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

import org.eclipse.emf.ecore.util.EcoreUtil;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Expense</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * </p>
 * <ul>
 *   <li>{@link TaxationWithRoot.impl.ExpenseImpl#getDeclared_amount <em>Declared amount</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.ExpenseImpl#getExpense_purpose <em>Expense purpose</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.ExpenseImpl#getDependent <em>Dependent</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.ExpenseImpl#getFrom_agent <em>From agent</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.ExpenseImpl#getIncome <em>Income</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.ExpenseImpl#getId4 <em>Id4</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.ExpenseImpl#getBeneficiary <em>Beneficiary</em>}</li>
 * </ul>
 *
 * @generated
 */
public class ExpenseImpl extends MinimalEObjectImpl.Container implements Expense {
	/**
	 * The default value of the '{@link #getDeclared_amount() <em>Declared amount</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDeclared_amount()
	 * @generated
	 * @ordered
	 */
	protected static final double DECLARED_AMOUNT_EDEFAULT = 0.0;

	/**
	 * The cached value of the '{@link #getDeclared_amount() <em>Declared amount</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDeclared_amount()
	 * @generated
	 * @ordered
	 */
	protected double declared_amount = DECLARED_AMOUNT_EDEFAULT;

	/**
	 * The default value of the '{@link #getExpense_purpose() <em>Expense purpose</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExpense_purpose()
	 * @generated
	 * @ordered
	 */
	protected static final Expense_Purpose EXPENSE_PURPOSE_EDEFAULT = Expense_Purpose.OTHER;

	/**
	 * The cached value of the '{@link #getExpense_purpose() <em>Expense purpose</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExpense_purpose()
	 * @generated
	 * @ordered
	 */
	protected Expense_Purpose expense_purpose = EXPENSE_PURPOSE_EDEFAULT;

	/**
	 * The cached value of the '{@link #getDependent() <em>Dependent</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDependent()
	 * @generated
	 * @ordered
	 */
	protected Dependent dependent;

	/**
	 * The cached value of the '{@link #getFrom_agent() <em>From agent</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getFrom_agent()
	 * @generated
	 * @ordered
	 */
	protected FromAgent from_agent;

	/**
	 * The default value of the '{@link #getId4() <em>Id4</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getId4()
	 * @generated
	 * @ordered
	 */
	protected static final String ID4_EDEFAULT = null;

	/**
	 * The cached value of the '{@link #getId4() <em>Id4</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getId4()
	 * @generated
	 * @ordered
	 */
	protected String id4 = ID4_EDEFAULT;

	/**
	 * The cached value of the '{@link #getBeneficiary() <em>Beneficiary</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getBeneficiary()
	 * @generated
	 * @ordered
	 */
	protected Physical_Person beneficiary;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected ExpenseImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return TaxationWithRootPackage.Literals.EXPENSE;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public double getDeclared_amount() {
		return declared_amount;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setDeclared_amount(double newDeclared_amount) {
		double oldDeclared_amount = declared_amount;
		declared_amount = newDeclared_amount;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__DECLARED_AMOUNT, oldDeclared_amount, declared_amount));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Expense_Purpose getExpense_purpose() {
		return expense_purpose;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setExpense_purpose(Expense_Purpose newExpense_purpose) {
		Expense_Purpose oldExpense_purpose = expense_purpose;
		expense_purpose = newExpense_purpose == null ? EXPENSE_PURPOSE_EDEFAULT : newExpense_purpose;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__EXPENSE_PURPOSE, oldExpense_purpose, expense_purpose));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Dependent getDependent() {
		if (dependent != null && dependent.eIsProxy()) {
			InternalEObject oldDependent = (InternalEObject)dependent;
			dependent = (Dependent)eResolveProxy(oldDependent);
			if (dependent != oldDependent) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationWithRootPackage.EXPENSE__DEPENDENT, oldDependent, dependent));
			}
		}
		return dependent;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Dependent basicGetDependent() {
		return dependent;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetDependent(Dependent newDependent, NotificationChain msgs) {
		Dependent oldDependent = dependent;
		dependent = newDependent;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__DEPENDENT, oldDependent, newDependent);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setDependent(Dependent newDependent) {
		if (newDependent != dependent) {
			NotificationChain msgs = null;
			if (dependent != null)
				msgs = ((InternalEObject)dependent).eInverseRemove(this, TaxationWithRootPackage.DEPENDENT__EXPENSE, Dependent.class, msgs);
			if (newDependent != null)
				msgs = ((InternalEObject)newDependent).eInverseAdd(this, TaxationWithRootPackage.DEPENDENT__EXPENSE, Dependent.class, msgs);
			msgs = basicSetDependent(newDependent, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__DEPENDENT, newDependent, newDependent));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public FromAgent getFrom_agent() {
		if (from_agent != null && from_agent.eIsProxy()) {
			InternalEObject oldFrom_agent = (InternalEObject)from_agent;
			from_agent = (FromAgent)eResolveProxy(oldFrom_agent);
			if (from_agent != oldFrom_agent) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationWithRootPackage.EXPENSE__FROM_AGENT, oldFrom_agent, from_agent));
			}
		}
		return from_agent;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FromAgent basicGetFrom_agent() {
		return from_agent;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetFrom_agent(FromAgent newFrom_agent, NotificationChain msgs) {
		FromAgent oldFrom_agent = from_agent;
		from_agent = newFrom_agent;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__FROM_AGENT, oldFrom_agent, newFrom_agent);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setFrom_agent(FromAgent newFrom_agent) {
		if (newFrom_agent != from_agent) {
			NotificationChain msgs = null;
			if (from_agent != null)
				msgs = ((InternalEObject)from_agent).eInverseRemove(this, TaxationWithRootPackage.FROM_AGENT__EXPENSE, FromAgent.class, msgs);
			if (newFrom_agent != null)
				msgs = ((InternalEObject)newFrom_agent).eInverseAdd(this, TaxationWithRootPackage.FROM_AGENT__EXPENSE, FromAgent.class, msgs);
			msgs = basicSetFrom_agent(newFrom_agent, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__FROM_AGENT, newFrom_agent, newFrom_agent));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Income getIncome() {
		if (eContainerFeatureID() != TaxationWithRootPackage.EXPENSE__INCOME) return null;
		return (Income)eInternalContainer();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetIncome(Income newIncome, NotificationChain msgs) {
		msgs = eBasicSetContainer((InternalEObject)newIncome, TaxationWithRootPackage.EXPENSE__INCOME, msgs);
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setIncome(Income newIncome) {
		if (newIncome != eInternalContainer() || (eContainerFeatureID() != TaxationWithRootPackage.EXPENSE__INCOME && newIncome != null)) {
			if (EcoreUtil.isAncestor(this, newIncome))
				throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
			NotificationChain msgs = null;
			if (eInternalContainer() != null)
				msgs = eBasicRemoveFromContainer(msgs);
			if (newIncome != null)
				msgs = ((InternalEObject)newIncome).eInverseAdd(this, TaxationWithRootPackage.INCOME__EXPENSES, Income.class, msgs);
			msgs = basicSetIncome(newIncome, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__INCOME, newIncome, newIncome));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String getId4() {
		return id4;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setId4(String newId4) {
		String oldId4 = id4;
		id4 = newId4;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__ID4, oldId4, id4));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Physical_Person getBeneficiary() {
		if (beneficiary != null && beneficiary.eIsProxy()) {
			InternalEObject oldBeneficiary = (InternalEObject)beneficiary;
			beneficiary = (Physical_Person)eResolveProxy(oldBeneficiary);
			if (beneficiary != oldBeneficiary) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationWithRootPackage.EXPENSE__BENEFICIARY, oldBeneficiary, beneficiary));
			}
		}
		return beneficiary;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Physical_Person basicGetBeneficiary() {
		return beneficiary;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetBeneficiary(Physical_Person newBeneficiary, NotificationChain msgs) {
		Physical_Person oldBeneficiary = beneficiary;
		beneficiary = newBeneficiary;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__BENEFICIARY, oldBeneficiary, newBeneficiary);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setBeneficiary(Physical_Person newBeneficiary) {
		if (newBeneficiary != beneficiary) {
			NotificationChain msgs = null;
			if (beneficiary != null)
				msgs = ((InternalEObject)beneficiary).eInverseRemove(this, TaxationWithRootPackage.PHYSICAL_PERSON__EXPENSES, Physical_Person.class, msgs);
			if (newBeneficiary != null)
				msgs = ((InternalEObject)newBeneficiary).eInverseAdd(this, TaxationWithRootPackage.PHYSICAL_PERSON__EXPENSES, Physical_Person.class, msgs);
			msgs = basicSetBeneficiary(newBeneficiary, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.EXPENSE__BENEFICIARY, newBeneficiary, newBeneficiary));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case TaxationWithRootPackage.EXPENSE__DEPENDENT:
				if (dependent != null)
					msgs = ((InternalEObject)dependent).eInverseRemove(this, TaxationWithRootPackage.DEPENDENT__EXPENSE, Dependent.class, msgs);
				return basicSetDependent((Dependent)otherEnd, msgs);
			case TaxationWithRootPackage.EXPENSE__FROM_AGENT:
				if (from_agent != null)
					msgs = ((InternalEObject)from_agent).eInverseRemove(this, TaxationWithRootPackage.FROM_AGENT__EXPENSE, FromAgent.class, msgs);
				return basicSetFrom_agent((FromAgent)otherEnd, msgs);
			case TaxationWithRootPackage.EXPENSE__INCOME:
				if (eInternalContainer() != null)
					msgs = eBasicRemoveFromContainer(msgs);
				return basicSetIncome((Income)otherEnd, msgs);
			case TaxationWithRootPackage.EXPENSE__BENEFICIARY:
				if (beneficiary != null)
					msgs = ((InternalEObject)beneficiary).eInverseRemove(this, TaxationWithRootPackage.PHYSICAL_PERSON__EXPENSES, Physical_Person.class, msgs);
				return basicSetBeneficiary((Physical_Person)otherEnd, msgs);
		}
		return super.eInverseAdd(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case TaxationWithRootPackage.EXPENSE__DEPENDENT:
				return basicSetDependent(null, msgs);
			case TaxationWithRootPackage.EXPENSE__FROM_AGENT:
				return basicSetFrom_agent(null, msgs);
			case TaxationWithRootPackage.EXPENSE__INCOME:
				return basicSetIncome(null, msgs);
			case TaxationWithRootPackage.EXPENSE__BENEFICIARY:
				return basicSetBeneficiary(null, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
		switch (eContainerFeatureID()) {
			case TaxationWithRootPackage.EXPENSE__INCOME:
				return eInternalContainer().eInverseRemove(this, TaxationWithRootPackage.INCOME__EXPENSES, Income.class, msgs);
		}
		return super.eBasicRemoveFromContainerFeature(msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case TaxationWithRootPackage.EXPENSE__DECLARED_AMOUNT:
				return getDeclared_amount();
			case TaxationWithRootPackage.EXPENSE__EXPENSE_PURPOSE:
				return getExpense_purpose();
			case TaxationWithRootPackage.EXPENSE__DEPENDENT:
				if (resolve) return getDependent();
				return basicGetDependent();
			case TaxationWithRootPackage.EXPENSE__FROM_AGENT:
				if (resolve) return getFrom_agent();
				return basicGetFrom_agent();
			case TaxationWithRootPackage.EXPENSE__INCOME:
				return getIncome();
			case TaxationWithRootPackage.EXPENSE__ID4:
				return getId4();
			case TaxationWithRootPackage.EXPENSE__BENEFICIARY:
				if (resolve) return getBeneficiary();
				return basicGetBeneficiary();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case TaxationWithRootPackage.EXPENSE__DECLARED_AMOUNT:
				setDeclared_amount((Double)newValue);
				return;
			case TaxationWithRootPackage.EXPENSE__EXPENSE_PURPOSE:
				setExpense_purpose((Expense_Purpose)newValue);
				return;
			case TaxationWithRootPackage.EXPENSE__DEPENDENT:
				setDependent((Dependent)newValue);
				return;
			case TaxationWithRootPackage.EXPENSE__FROM_AGENT:
				setFrom_agent((FromAgent)newValue);
				return;
			case TaxationWithRootPackage.EXPENSE__INCOME:
				setIncome((Income)newValue);
				return;
			case TaxationWithRootPackage.EXPENSE__ID4:
				setId4((String)newValue);
				return;
			case TaxationWithRootPackage.EXPENSE__BENEFICIARY:
				setBeneficiary((Physical_Person)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case TaxationWithRootPackage.EXPENSE__DECLARED_AMOUNT:
				setDeclared_amount(DECLARED_AMOUNT_EDEFAULT);
				return;
			case TaxationWithRootPackage.EXPENSE__EXPENSE_PURPOSE:
				setExpense_purpose(EXPENSE_PURPOSE_EDEFAULT);
				return;
			case TaxationWithRootPackage.EXPENSE__DEPENDENT:
				setDependent((Dependent)null);
				return;
			case TaxationWithRootPackage.EXPENSE__FROM_AGENT:
				setFrom_agent((FromAgent)null);
				return;
			case TaxationWithRootPackage.EXPENSE__INCOME:
				setIncome((Income)null);
				return;
			case TaxationWithRootPackage.EXPENSE__ID4:
				setId4(ID4_EDEFAULT);
				return;
			case TaxationWithRootPackage.EXPENSE__BENEFICIARY:
				setBeneficiary((Physical_Person)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case TaxationWithRootPackage.EXPENSE__DECLARED_AMOUNT:
				return declared_amount != DECLARED_AMOUNT_EDEFAULT;
			case TaxationWithRootPackage.EXPENSE__EXPENSE_PURPOSE:
				return expense_purpose != EXPENSE_PURPOSE_EDEFAULT;
			case TaxationWithRootPackage.EXPENSE__DEPENDENT:
				return dependent != null;
			case TaxationWithRootPackage.EXPENSE__FROM_AGENT:
				return from_agent != null;
			case TaxationWithRootPackage.EXPENSE__INCOME:
				return getIncome() != null;
			case TaxationWithRootPackage.EXPENSE__ID4:
				return ID4_EDEFAULT == null ? id4 != null : !ID4_EDEFAULT.equals(id4);
			case TaxationWithRootPackage.EXPENSE__BENEFICIARY:
				return beneficiary != null;
		}
		return super.eIsSet(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		if (eIsProxy()) return super.toString();

		StringBuilder result = new StringBuilder(super.toString());
		result.append(" (declared_amount: ");
		result.append(declared_amount);
		result.append(", expense_purpose: ");
		result.append(expense_purpose);
		result.append(", id4: ");
		result.append(id4);
		result.append(')');
		return result.toString();
	}

} //ExpenseImpl