aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/DependentImpl.java
blob: f61110148f7bcf9d0d0f48c447a7b22bd8c381db (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
/**
 */
package TaxationWithRoot.impl;

import TaxationWithRoot.Dependent;
import TaxationWithRoot.Dependent_Type;
import TaxationWithRoot.Expense;
import TaxationWithRoot.External_Allowance;
import TaxationWithRoot.FromAgent;
import TaxationWithRoot.Household;
import TaxationWithRoot.Tax_Payer;
import TaxationWithRoot.TaxationWithRootPackage;

import java.util.Collection;

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

import org.eclipse.emf.common.util.EList;

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

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

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

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Dependent</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * </p>
 * <ul>
 *   <li>{@link TaxationWithRoot.impl.DependentImpl#getDependent_type <em>Dependent type</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.DependentImpl#getResponsible_person <em>Responsible person</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.DependentImpl#isContinued_studies <em>Continued studies</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.DependentImpl#getAllowances <em>Allowances</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.DependentImpl#getHousehold <em>Household</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.DependentImpl#getFrom_agent <em>From agent</em>}</li>
 *   <li>{@link TaxationWithRoot.impl.DependentImpl#getExpense <em>Expense</em>}</li>
 * </ul>
 *
 * @generated
 */
public class DependentImpl extends Physical_PersonImpl implements Dependent {
	/**
	 * The default value of the '{@link #getDependent_type() <em>Dependent type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDependent_type()
	 * @generated
	 * @ordered
	 */
	protected static final Dependent_Type DEPENDENT_TYPE_EDEFAULT = Dependent_Type.CHILD;

	/**
	 * The cached value of the '{@link #getDependent_type() <em>Dependent type</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getDependent_type()
	 * @generated
	 * @ordered
	 */
	protected Dependent_Type dependent_type = DEPENDENT_TYPE_EDEFAULT;

	/**
	 * The default value of the '{@link #isContinued_studies() <em>Continued studies</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isContinued_studies()
	 * @generated
	 * @ordered
	 */
	protected static final boolean CONTINUED_STUDIES_EDEFAULT = false;

	/**
	 * The cached value of the '{@link #isContinued_studies() <em>Continued studies</em>}' attribute.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #isContinued_studies()
	 * @generated
	 * @ordered
	 */
	protected boolean continued_studies = CONTINUED_STUDIES_EDEFAULT;

	/**
	 * The cached value of the '{@link #getAllowances() <em>Allowances</em>}' containment reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getAllowances()
	 * @generated
	 * @ordered
	 */
	protected External_Allowance allowances;

	/**
	 * 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 cached value of the '{@link #getExpense() <em>Expense</em>}' reference list.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getExpense()
	 * @generated
	 * @ordered
	 */
	protected EList<Expense> expense;

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

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

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Dependent_Type getDependent_type() {
		return dependent_type;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setDependent_type(Dependent_Type newDependent_type) {
		Dependent_Type oldDependent_type = dependent_type;
		dependent_type = newDependent_type == null ? DEPENDENT_TYPE_EDEFAULT : newDependent_type;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.DEPENDENT__DEPENDENT_TYPE, oldDependent_type, dependent_type));
	}

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

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetResponsible_person(Tax_Payer newResponsible_person, NotificationChain msgs) {
		msgs = eBasicSetContainer((InternalEObject)newResponsible_person, TaxationWithRootPackage.DEPENDENT__RESPONSIBLE_PERSON, msgs);
		return msgs;
	}

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

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean isContinued_studies() {
		return continued_studies;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setContinued_studies(boolean newContinued_studies) {
		boolean oldContinued_studies = continued_studies;
		continued_studies = newContinued_studies;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.DEPENDENT__CONTINUED_STUDIES, oldContinued_studies, continued_studies));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public External_Allowance getAllowances() {
		return allowances;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetAllowances(External_Allowance newAllowances, NotificationChain msgs) {
		External_Allowance oldAllowances = allowances;
		allowances = newAllowances;
		if (eNotificationRequired()) {
			ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.DEPENDENT__ALLOWANCES, oldAllowances, newAllowances);
			if (msgs == null) msgs = notification; else msgs.add(notification);
		}
		return msgs;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setAllowances(External_Allowance newAllowances) {
		if (newAllowances != allowances) {
			NotificationChain msgs = null;
			if (allowances != null)
				msgs = ((InternalEObject)allowances).eInverseRemove(this, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON, External_Allowance.class, msgs);
			if (newAllowances != null)
				msgs = ((InternalEObject)newAllowances).eInverseAdd(this, TaxationWithRootPackage.EXTERNAL_ALLOWANCE__PERSON, External_Allowance.class, msgs);
			msgs = basicSetAllowances(newAllowances, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.DEPENDENT__ALLOWANCES, newAllowances, newAllowances));
	}

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

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public NotificationChain basicSetHousehold(Household newHousehold, NotificationChain msgs) {
		msgs = eBasicSetContainer((InternalEObject)newHousehold, TaxationWithRootPackage.DEPENDENT__HOUSEHOLD, msgs);
		return msgs;
	}

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

	/**
	 * <!-- 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.DEPENDENT__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.DEPENDENT__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__DEPENDENT, FromAgent.class, msgs);
			if (newFrom_agent != null)
				msgs = ((InternalEObject)newFrom_agent).eInverseAdd(this, TaxationWithRootPackage.FROM_AGENT__DEPENDENT, FromAgent.class, msgs);
			msgs = basicSetFrom_agent(newFrom_agent, msgs);
			if (msgs != null) msgs.dispatch();
		}
		else if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.DEPENDENT__FROM_AGENT, newFrom_agent, newFrom_agent));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public EList<Expense> getExpense() {
		if (expense == null) {
			expense = new EObjectWithInverseResolvingEList<Expense>(Expense.class, this, TaxationWithRootPackage.DEPENDENT__EXPENSE, TaxationWithRootPackage.EXPENSE__DEPENDENT);
		}
		return expense;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
		switch (featureID) {
			case TaxationWithRootPackage.DEPENDENT__RESPONSIBLE_PERSON:
				if (eInternalContainer() != null)
					msgs = eBasicRemoveFromContainer(msgs);
				return basicSetResponsible_person((Tax_Payer)otherEnd, msgs);
			case TaxationWithRootPackage.DEPENDENT__ALLOWANCES:
				if (allowances != null)
					msgs = ((InternalEObject)allowances).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - TaxationWithRootPackage.DEPENDENT__ALLOWANCES, null, msgs);
				return basicSetAllowances((External_Allowance)otherEnd, msgs);
			case TaxationWithRootPackage.DEPENDENT__HOUSEHOLD:
				if (eInternalContainer() != null)
					msgs = eBasicRemoveFromContainer(msgs);
				return basicSetHousehold((Household)otherEnd, msgs);
			case TaxationWithRootPackage.DEPENDENT__FROM_AGENT:
				if (from_agent != null)
					msgs = ((InternalEObject)from_agent).eInverseRemove(this, TaxationWithRootPackage.FROM_AGENT__DEPENDENT, FromAgent.class, msgs);
				return basicSetFrom_agent((FromAgent)otherEnd, msgs);
			case TaxationWithRootPackage.DEPENDENT__EXPENSE:
				return ((InternalEList<InternalEObject>)(InternalEList<?>)getExpense()).basicAdd(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.DEPENDENT__RESPONSIBLE_PERSON:
				return basicSetResponsible_person(null, msgs);
			case TaxationWithRootPackage.DEPENDENT__ALLOWANCES:
				return basicSetAllowances(null, msgs);
			case TaxationWithRootPackage.DEPENDENT__HOUSEHOLD:
				return basicSetHousehold(null, msgs);
			case TaxationWithRootPackage.DEPENDENT__FROM_AGENT:
				return basicSetFrom_agent(null, msgs);
			case TaxationWithRootPackage.DEPENDENT__EXPENSE:
				return ((InternalEList<?>)getExpense()).basicRemove(otherEnd, msgs);
		}
		return super.eInverseRemove(otherEnd, featureID, msgs);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
		switch (eContainerFeatureID()) {
			case TaxationWithRootPackage.DEPENDENT__RESPONSIBLE_PERSON:
				return eInternalContainer().eInverseRemove(this, TaxationWithRootPackage.TAX_PAYER__DEPENDENTS, Tax_Payer.class, msgs);
			case TaxationWithRootPackage.DEPENDENT__HOUSEHOLD:
				return eInternalContainer().eInverseRemove(this, TaxationWithRootPackage.HOUSEHOLD__CHILDREN, Household.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.DEPENDENT__DEPENDENT_TYPE:
				return getDependent_type();
			case TaxationWithRootPackage.DEPENDENT__RESPONSIBLE_PERSON:
				return getResponsible_person();
			case TaxationWithRootPackage.DEPENDENT__CONTINUED_STUDIES:
				return isContinued_studies();
			case TaxationWithRootPackage.DEPENDENT__ALLOWANCES:
				return getAllowances();
			case TaxationWithRootPackage.DEPENDENT__HOUSEHOLD:
				return getHousehold();
			case TaxationWithRootPackage.DEPENDENT__FROM_AGENT:
				if (resolve) return getFrom_agent();
				return basicGetFrom_agent();
			case TaxationWithRootPackage.DEPENDENT__EXPENSE:
				return getExpense();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case TaxationWithRootPackage.DEPENDENT__DEPENDENT_TYPE:
				setDependent_type((Dependent_Type)newValue);
				return;
			case TaxationWithRootPackage.DEPENDENT__RESPONSIBLE_PERSON:
				setResponsible_person((Tax_Payer)newValue);
				return;
			case TaxationWithRootPackage.DEPENDENT__CONTINUED_STUDIES:
				setContinued_studies((Boolean)newValue);
				return;
			case TaxationWithRootPackage.DEPENDENT__ALLOWANCES:
				setAllowances((External_Allowance)newValue);
				return;
			case TaxationWithRootPackage.DEPENDENT__HOUSEHOLD:
				setHousehold((Household)newValue);
				return;
			case TaxationWithRootPackage.DEPENDENT__FROM_AGENT:
				setFrom_agent((FromAgent)newValue);
				return;
			case TaxationWithRootPackage.DEPENDENT__EXPENSE:
				getExpense().clear();
				getExpense().addAll((Collection<? extends Expense>)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case TaxationWithRootPackage.DEPENDENT__DEPENDENT_TYPE:
				setDependent_type(DEPENDENT_TYPE_EDEFAULT);
				return;
			case TaxationWithRootPackage.DEPENDENT__RESPONSIBLE_PERSON:
				setResponsible_person((Tax_Payer)null);
				return;
			case TaxationWithRootPackage.DEPENDENT__CONTINUED_STUDIES:
				setContinued_studies(CONTINUED_STUDIES_EDEFAULT);
				return;
			case TaxationWithRootPackage.DEPENDENT__ALLOWANCES:
				setAllowances((External_Allowance)null);
				return;
			case TaxationWithRootPackage.DEPENDENT__HOUSEHOLD:
				setHousehold((Household)null);
				return;
			case TaxationWithRootPackage.DEPENDENT__FROM_AGENT:
				setFrom_agent((FromAgent)null);
				return;
			case TaxationWithRootPackage.DEPENDENT__EXPENSE:
				getExpense().clear();
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case TaxationWithRootPackage.DEPENDENT__DEPENDENT_TYPE:
				return dependent_type != DEPENDENT_TYPE_EDEFAULT;
			case TaxationWithRootPackage.DEPENDENT__RESPONSIBLE_PERSON:
				return getResponsible_person() != null;
			case TaxationWithRootPackage.DEPENDENT__CONTINUED_STUDIES:
				return continued_studies != CONTINUED_STUDIES_EDEFAULT;
			case TaxationWithRootPackage.DEPENDENT__ALLOWANCES:
				return allowances != null;
			case TaxationWithRootPackage.DEPENDENT__HOUSEHOLD:
				return getHousehold() != null;
			case TaxationWithRootPackage.DEPENDENT__FROM_AGENT:
				return from_agent != null;
			case TaxationWithRootPackage.DEPENDENT__EXPENSE:
				return expense != null && !expense.isEmpty();
		}
		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(" (dependent_type: ");
		result.append(dependent_type);
		result.append(", continued_studies: ");
		result.append(continued_studies);
		result.append(')');
		return result.toString();
	}

} //DependentImpl