aboutsummaryrefslogtreecommitdiffstats
path: root/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TaxImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TaxImpl.java')
-rw-r--r--Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TaxImpl.java341
1 files changed, 341 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TaxImpl.java b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TaxImpl.java
new file mode 100644
index 00000000..58619bc1
--- /dev/null
+++ b/Tests/MODELS2020-CaseStudies/models20.diversity-calculator/src/TaxationWithRoot/impl/Income_TaxImpl.java
@@ -0,0 +1,341 @@
1/**
2 */
3package TaxationWithRoot.impl;
4
5import TaxationWithRoot.Income_Tax;
6import TaxationWithRoot.Tax_Payer;
7import TaxationWithRoot.TaxationWithRootPackage;
8
9import org.eclipse.emf.common.notify.Notification;
10
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.emf.ecore.InternalEObject;
13
14import org.eclipse.emf.ecore.impl.ENotificationImpl;
15import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
16
17/**
18 * <!-- begin-user-doc -->
19 * An implementation of the model object '<em><b>Income Tax</b></em>'.
20 * <!-- end-user-doc -->
21 * <p>
22 * The following features are implemented:
23 * </p>
24 * <ul>
25 * <li>{@link TaxationWithRoot.impl.Income_TaxImpl#getTaxPayer <em>Tax Payer</em>}</li>
26 * <li>{@link TaxationWithRoot.impl.Income_TaxImpl#getTax_amount <em>Tax amount</em>}</li>
27 * <li>{@link TaxationWithRoot.impl.Income_TaxImpl#getTax_year <em>Tax year</em>}</li>
28 * <li>{@link TaxationWithRoot.impl.Income_TaxImpl#getId6 <em>Id6</em>}</li>
29 * </ul>
30 *
31 * @generated
32 */
33public class Income_TaxImpl extends MinimalEObjectImpl.Container implements Income_Tax {
34 /**
35 * The cached value of the '{@link #getTaxPayer() <em>Tax Payer</em>}' reference.
36 * <!-- begin-user-doc -->
37 * <!-- end-user-doc -->
38 * @see #getTaxPayer()
39 * @generated
40 * @ordered
41 */
42 protected Tax_Payer taxPayer;
43
44 /**
45 * The default value of the '{@link #getTax_amount() <em>Tax amount</em>}' attribute.
46 * <!-- begin-user-doc -->
47 * <!-- end-user-doc -->
48 * @see #getTax_amount()
49 * @generated
50 * @ordered
51 */
52 protected static final double TAX_AMOUNT_EDEFAULT = 0.0;
53
54 /**
55 * The cached value of the '{@link #getTax_amount() <em>Tax amount</em>}' attribute.
56 * <!-- begin-user-doc -->
57 * <!-- end-user-doc -->
58 * @see #getTax_amount()
59 * @generated
60 * @ordered
61 */
62 protected double tax_amount = TAX_AMOUNT_EDEFAULT;
63
64 /**
65 * The default value of the '{@link #getTax_year() <em>Tax year</em>}' attribute.
66 * <!-- begin-user-doc -->
67 * <!-- end-user-doc -->
68 * @see #getTax_year()
69 * @generated
70 * @ordered
71 */
72 protected static final int TAX_YEAR_EDEFAULT = 0;
73
74 /**
75 * The cached value of the '{@link #getTax_year() <em>Tax year</em>}' attribute.
76 * <!-- begin-user-doc -->
77 * <!-- end-user-doc -->
78 * @see #getTax_year()
79 * @generated
80 * @ordered
81 */
82 protected int tax_year = TAX_YEAR_EDEFAULT;
83
84 /**
85 * The default value of the '{@link #getId6() <em>Id6</em>}' attribute.
86 * <!-- begin-user-doc -->
87 * <!-- end-user-doc -->
88 * @see #getId6()
89 * @generated
90 * @ordered
91 */
92 protected static final String ID6_EDEFAULT = null;
93
94 /**
95 * The cached value of the '{@link #getId6() <em>Id6</em>}' attribute.
96 * <!-- begin-user-doc -->
97 * <!-- end-user-doc -->
98 * @see #getId6()
99 * @generated
100 * @ordered
101 */
102 protected String id6 = ID6_EDEFAULT;
103
104 /**
105 * <!-- begin-user-doc -->
106 * <!-- end-user-doc -->
107 * @generated
108 */
109 protected Income_TaxImpl() {
110 super();
111 }
112
113 /**
114 * <!-- begin-user-doc -->
115 * <!-- end-user-doc -->
116 * @generated
117 */
118 @Override
119 protected EClass eStaticClass() {
120 return TaxationWithRootPackage.Literals.INCOME_TAX;
121 }
122
123 /**
124 * <!-- begin-user-doc -->
125 * <!-- end-user-doc -->
126 * @generated
127 */
128 @Override
129 public Tax_Payer getTaxPayer() {
130 if (taxPayer != null && taxPayer.eIsProxy()) {
131 InternalEObject oldTaxPayer = (InternalEObject)taxPayer;
132 taxPayer = (Tax_Payer)eResolveProxy(oldTaxPayer);
133 if (taxPayer != oldTaxPayer) {
134 if (eNotificationRequired())
135 eNotify(new ENotificationImpl(this, Notification.RESOLVE, TaxationWithRootPackage.INCOME_TAX__TAX_PAYER, oldTaxPayer, taxPayer));
136 }
137 }
138 return taxPayer;
139 }
140
141 /**
142 * <!-- begin-user-doc -->
143 * <!-- end-user-doc -->
144 * @generated
145 */
146 public Tax_Payer basicGetTaxPayer() {
147 return taxPayer;
148 }
149
150 /**
151 * <!-- begin-user-doc -->
152 * <!-- end-user-doc -->
153 * @generated
154 */
155 @Override
156 public void setTaxPayer(Tax_Payer newTaxPayer) {
157 Tax_Payer oldTaxPayer = taxPayer;
158 taxPayer = newTaxPayer;
159 if (eNotificationRequired())
160 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.INCOME_TAX__TAX_PAYER, oldTaxPayer, taxPayer));
161 }
162
163 /**
164 * <!-- begin-user-doc -->
165 * <!-- end-user-doc -->
166 * @generated
167 */
168 @Override
169 public double getTax_amount() {
170 return tax_amount;
171 }
172
173 /**
174 * <!-- begin-user-doc -->
175 * <!-- end-user-doc -->
176 * @generated
177 */
178 @Override
179 public void setTax_amount(double newTax_amount) {
180 double oldTax_amount = tax_amount;
181 tax_amount = newTax_amount;
182 if (eNotificationRequired())
183 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.INCOME_TAX__TAX_AMOUNT, oldTax_amount, tax_amount));
184 }
185
186 /**
187 * <!-- begin-user-doc -->
188 * <!-- end-user-doc -->
189 * @generated
190 */
191 @Override
192 public int getTax_year() {
193 return tax_year;
194 }
195
196 /**
197 * <!-- begin-user-doc -->
198 * <!-- end-user-doc -->
199 * @generated
200 */
201 @Override
202 public void setTax_year(int newTax_year) {
203 int oldTax_year = tax_year;
204 tax_year = newTax_year;
205 if (eNotificationRequired())
206 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.INCOME_TAX__TAX_YEAR, oldTax_year, tax_year));
207 }
208
209 /**
210 * <!-- begin-user-doc -->
211 * <!-- end-user-doc -->
212 * @generated
213 */
214 @Override
215 public String getId6() {
216 return id6;
217 }
218
219 /**
220 * <!-- begin-user-doc -->
221 * <!-- end-user-doc -->
222 * @generated
223 */
224 @Override
225 public void setId6(String newId6) {
226 String oldId6 = id6;
227 id6 = newId6;
228 if (eNotificationRequired())
229 eNotify(new ENotificationImpl(this, Notification.SET, TaxationWithRootPackage.INCOME_TAX__ID6, oldId6, id6));
230 }
231
232 /**
233 * <!-- begin-user-doc -->
234 * <!-- end-user-doc -->
235 * @generated
236 */
237 @Override
238 public Object eGet(int featureID, boolean resolve, boolean coreType) {
239 switch (featureID) {
240 case TaxationWithRootPackage.INCOME_TAX__TAX_PAYER:
241 if (resolve) return getTaxPayer();
242 return basicGetTaxPayer();
243 case TaxationWithRootPackage.INCOME_TAX__TAX_AMOUNT:
244 return getTax_amount();
245 case TaxationWithRootPackage.INCOME_TAX__TAX_YEAR:
246 return getTax_year();
247 case TaxationWithRootPackage.INCOME_TAX__ID6:
248 return getId6();
249 }
250 return super.eGet(featureID, resolve, coreType);
251 }
252
253 /**
254 * <!-- begin-user-doc -->
255 * <!-- end-user-doc -->
256 * @generated
257 */
258 @Override
259 public void eSet(int featureID, Object newValue) {
260 switch (featureID) {
261 case TaxationWithRootPackage.INCOME_TAX__TAX_PAYER:
262 setTaxPayer((Tax_Payer)newValue);
263 return;
264 case TaxationWithRootPackage.INCOME_TAX__TAX_AMOUNT:
265 setTax_amount((Double)newValue);
266 return;
267 case TaxationWithRootPackage.INCOME_TAX__TAX_YEAR:
268 setTax_year((Integer)newValue);
269 return;
270 case TaxationWithRootPackage.INCOME_TAX__ID6:
271 setId6((String)newValue);
272 return;
273 }
274 super.eSet(featureID, newValue);
275 }
276
277 /**
278 * <!-- begin-user-doc -->
279 * <!-- end-user-doc -->
280 * @generated
281 */
282 @Override
283 public void eUnset(int featureID) {
284 switch (featureID) {
285 case TaxationWithRootPackage.INCOME_TAX__TAX_PAYER:
286 setTaxPayer((Tax_Payer)null);
287 return;
288 case TaxationWithRootPackage.INCOME_TAX__TAX_AMOUNT:
289 setTax_amount(TAX_AMOUNT_EDEFAULT);
290 return;
291 case TaxationWithRootPackage.INCOME_TAX__TAX_YEAR:
292 setTax_year(TAX_YEAR_EDEFAULT);
293 return;
294 case TaxationWithRootPackage.INCOME_TAX__ID6:
295 setId6(ID6_EDEFAULT);
296 return;
297 }
298 super.eUnset(featureID);
299 }
300
301 /**
302 * <!-- begin-user-doc -->
303 * <!-- end-user-doc -->
304 * @generated
305 */
306 @Override
307 public boolean eIsSet(int featureID) {
308 switch (featureID) {
309 case TaxationWithRootPackage.INCOME_TAX__TAX_PAYER:
310 return taxPayer != null;
311 case TaxationWithRootPackage.INCOME_TAX__TAX_AMOUNT:
312 return tax_amount != TAX_AMOUNT_EDEFAULT;
313 case TaxationWithRootPackage.INCOME_TAX__TAX_YEAR:
314 return tax_year != TAX_YEAR_EDEFAULT;
315 case TaxationWithRootPackage.INCOME_TAX__ID6:
316 return ID6_EDEFAULT == null ? id6 != null : !ID6_EDEFAULT.equals(id6);
317 }
318 return super.eIsSet(featureID);
319 }
320
321 /**
322 * <!-- begin-user-doc -->
323 * <!-- end-user-doc -->
324 * @generated
325 */
326 @Override
327 public String toString() {
328 if (eIsProxy()) return super.toString();
329
330 StringBuilder result = new StringBuilder(super.toString());
331 result.append(" (tax_amount: ");
332 result.append(tax_amount);
333 result.append(", tax_year: ");
334 result.append(tax_year);
335 result.append(", id6: ");
336 result.append(id6);
337 result.append(')');
338 return result.toString();
339 }
340
341} //Income_TaxImpl