aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TypeImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TypeImpl.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TypeImpl.java268
1 files changed, 268 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TypeImpl.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TypeImpl.java
new file mode 100644
index 00000000..c3411b34
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TypeImpl.java
@@ -0,0 +1,268 @@
1/**
2 */
3package TaxationWithRoot.impl;
4
5import TaxationWithRoot.Income;
6import TaxationWithRoot.Income_Type;
7import TaxationWithRoot.TaxationWithRootPackage;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
11
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.emf.ecore.InternalEObject;
14
15import org.eclipse.emf.ecore.impl.ENotificationImpl;
16import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
17
18import org.eclipse.emf.ecore.util.EcoreUtil;
19
20/**
21 * <!-- begin-user-doc -->
22 * An implementation of the model object '<em><b>Income Type</b></em>'.
23 * <!-- end-user-doc -->
24 * <p>
25 * The following features are implemented:
26 * </p>
27 * <ul>
28 * <li>{@link TaxationWithRoot.impl.Income_TypeImpl#getId8 <em>Id8</em>}</li>
29 * <li>{@link TaxationWithRoot.impl.Income_TypeImpl#getIncome <em>Income</em>}</li>
30 * </ul>
31 *
32 * @generated
33 */
34public abstract class Income_TypeImpl extends MinimalEObjectImpl.Container implements Income_Type {
35 /**
36 * The default value of the '{@link #getId8() <em>Id8</em>}' attribute.
37 * <!-- begin-user-doc -->
38 * <!-- end-user-doc -->
39 * @see #getId8()
40 * @generated
41 * @ordered
42 */
43 protected static final String ID8_EDEFAULT = null;
44
45 /**
46 * The cached value of the '{@link #getId8() <em>Id8</em>}' attribute.
47 * <!-- begin-user-doc -->
48 * <!-- end-user-doc -->
49 * @see #getId8()
50 * @generated
51 * @ordered
52 */
53 protected String id8 = ID8_EDEFAULT;
54
55 /**
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @generated
59 */
60 protected Income_TypeImpl() {
61 super();
62 }
63
64 /**
65 * <!-- begin-user-doc -->
66 * <!-- end-user-doc -->
67 * @generated
68 */
69 @Override
70 protected EClass eStaticClass() {
71 return TaxationWithRootPackage.Literals.INCOME_TYPE;
72 }
73
74 /**
75 * <!-- begin-user-doc -->
76 * <!-- end-user-doc -->
77 * @generated
78 */
79 @Override
80 public String getId8() {
81 return id8;
82 }
83
84 /**
85 * <!-- begin-user-doc -->
86 * <!-- end-user-doc -->
87 * @generated
88 */
89 @Override
90 public void setId8(String newId8) {
91 String oldId8 = id8;
92 id8 = newId8;
93 if (eNotificationRequired())
94 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.INCOME_TYPE__ID8, oldId8, id8));
95 }
96
97 /**
98 * <!-- begin-user-doc -->
99 * <!-- end-user-doc -->
100 * @generated
101 */
102 @Override
103 public Income getIncome() {
104 if (eContainerFeatureID() != TaxationWithRootPackage.INCOME_TYPE__INCOME) return null;
105 return (Income)eInternalContainer();
106 }
107
108 /**
109 * <!-- begin-user-doc -->
110 * <!-- end-user-doc -->
111 * @generated
112 */
113 public NotificationChain basicSetIncome(Income newIncome, NotificationChain msgs) {
114 msgs = eBasicSetContainer((InternalEObject)newIncome, TaxationWithRootPackage.INCOME_TYPE__INCOME, msgs);
115 return msgs;
116 }
117
118 /**
119 * <!-- begin-user-doc -->
120 * <!-- end-user-doc -->
121 * @generated
122 */
123 @Override
124 public void setIncome(Income newIncome) {
125 if (newIncome != eInternalContainer() || (eContainerFeatureID() != TaxationWithRootPackage.INCOME_TYPE__INCOME && newIncome != null)) {
126 if (EcoreUtil.isAncestor(this, newIncome))
127 throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
128 NotificationChain msgs = null;
129 if (eInternalContainer() != null)
130 msgs = eBasicRemoveFromContainer(msgs);
131 if (newIncome != null)
132 msgs = ((InternalEObject)newIncome).eInverseAdd(this, TaxationWithRootPackage.INCOME__INCOME_TYPE, Income.class, msgs);
133 msgs = basicSetIncome(newIncome, msgs);
134 if (msgs != null) msgs.dispatch();
135 }
136 else if (eNotificationRequired())
137 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.INCOME_TYPE__INCOME, newIncome, newIncome));
138 }
139
140 /**
141 * <!-- begin-user-doc -->
142 * <!-- end-user-doc -->
143 * @generated
144 */
145 @Override
146 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
147 switch (featureID) {
148 case TaxationWithRootPackage.INCOME_TYPE__INCOME:
149 if (eInternalContainer() != null)
150 msgs = eBasicRemoveFromContainer(msgs);
151 return basicSetIncome((Income)otherEnd, msgs);
152 }
153 return super.eInverseAdd(otherEnd, featureID, msgs);
154 }
155
156 /**
157 * <!-- begin-user-doc -->
158 * <!-- end-user-doc -->
159 * @generated
160 */
161 @Override
162 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
163 switch (featureID) {
164 case TaxationWithRootPackage.INCOME_TYPE__INCOME:
165 return basicSetIncome(null, msgs);
166 }
167 return super.eInverseRemove(otherEnd, featureID, msgs);
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 @Override
176 public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
177 switch (eContainerFeatureID()) {
178 case TaxationWithRootPackage.INCOME_TYPE__INCOME:
179 return eInternalContainer().eInverseRemove(this, TaxationWithRootPackage.INCOME__INCOME_TYPE, Income.class, msgs);
180 }
181 return super.eBasicRemoveFromContainerFeature(msgs);
182 }
183
184 /**
185 * <!-- begin-user-doc -->
186 * <!-- end-user-doc -->
187 * @generated
188 */
189 @Override
190 public Object eGet(int featureID, boolean resolve, boolean coreType) {
191 switch (featureID) {
192 case TaxationWithRootPackage.INCOME_TYPE__ID8:
193 return getId8();
194 case TaxationWithRootPackage.INCOME_TYPE__INCOME:
195 return getIncome();
196 }
197 return super.eGet(featureID, resolve, coreType);
198 }
199
200 /**
201 * <!-- begin-user-doc -->
202 * <!-- end-user-doc -->
203 * @generated
204 */
205 @Override
206 public void eSet(int featureID, Object newValue) {
207 switch (featureID) {
208 case TaxationWithRootPackage.INCOME_TYPE__ID8:
209 setId8((String)newValue);
210 return;
211 case TaxationWithRootPackage.INCOME_TYPE__INCOME:
212 setIncome((Income)newValue);
213 return;
214 }
215 super.eSet(featureID, newValue);
216 }
217
218 /**
219 * <!-- begin-user-doc -->
220 * <!-- end-user-doc -->
221 * @generated
222 */
223 @Override
224 public void eUnset(int featureID) {
225 switch (featureID) {
226 case TaxationWithRootPackage.INCOME_TYPE__ID8:
227 setId8(ID8_EDEFAULT);
228 return;
229 case TaxationWithRootPackage.INCOME_TYPE__INCOME:
230 setIncome((Income)null);
231 return;
232 }
233 super.eUnset(featureID);
234 }
235
236 /**
237 * <!-- begin-user-doc -->
238 * <!-- end-user-doc -->
239 * @generated
240 */
241 @Override
242 public boolean eIsSet(int featureID) {
243 switch (featureID) {
244 case TaxationWithRootPackage.INCOME_TYPE__ID8:
245 return ID8_EDEFAULT == null ? id8 != null : !ID8_EDEFAULT.equals(id8);
246 case TaxationWithRootPackage.INCOME_TYPE__INCOME:
247 return getIncome() != null;
248 }
249 return super.eIsSet(featureID);
250 }
251
252 /**
253 * <!-- begin-user-doc -->
254 * <!-- end-user-doc -->
255 * @generated
256 */
257 @Override
258 public String toString() {
259 if (eIsProxy()) return super.toString();
260
261 StringBuilder result = new StringBuilder(super.toString());
262 result.append(" (id8: ");
263 result.append(id8);
264 result.append(')');
265 return result.toString();
266 }
267
268} //Income_TypeImpl