1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package de.uka.ipd.sdq.sensitivity.impl; |
8 | |
9 | import de.uka.ipd.sdq.sensitivity.SensitivityPackage; |
10 | import de.uka.ipd.sdq.sensitivity.SensitivityParameterVariation; |
11 | import de.uka.ipd.sdq.sensitivity.SingleSensitivityParameter; |
12 | |
13 | import org.eclipse.emf.common.notify.Notification; |
14 | import org.eclipse.emf.common.notify.NotificationChain; |
15 | |
16 | import org.eclipse.emf.ecore.EClass; |
17 | import org.eclipse.emf.ecore.InternalEObject; |
18 | |
19 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
20 | |
21 | /** |
22 | * <!-- begin-user-doc --> |
23 | * An implementation of the model object '<em><b>Single Sensitivity Parameter</b></em>'. |
24 | * <!-- end-user-doc --> |
25 | * <p> |
26 | * The following features are implemented: |
27 | * <ul> |
28 | * <li>{@link de.uka.ipd.sdq.sensitivity.impl.SingleSensitivityParameterImpl#getSensitivityParameterVariation__SingleSensitivityParameter <em>Sensitivity Parameter Variation Single Sensitivity Parameter</em>}</li> |
29 | * </ul> |
30 | * </p> |
31 | * |
32 | * @generated |
33 | */ |
34 | public abstract class SingleSensitivityParameterImpl extends SensitivityParameterImpl implements SingleSensitivityParameter { |
35 | /** |
36 | * The cached value of the '{@link #getSensitivityParameterVariation__SingleSensitivityParameter() <em>Sensitivity Parameter Variation Single Sensitivity Parameter</em>}' containment reference. |
37 | * <!-- begin-user-doc --> |
38 | * <!-- end-user-doc --> |
39 | * @see #getSensitivityParameterVariation__SingleSensitivityParameter() |
40 | * @generated |
41 | * @ordered |
42 | */ |
43 | protected SensitivityParameterVariation sensitivityParameterVariation__SingleSensitivityParameter; |
44 | |
45 | /** |
46 | * <!-- begin-user-doc --> |
47 | * <!-- end-user-doc --> |
48 | * @generated |
49 | */ |
50 | protected SingleSensitivityParameterImpl() { |
51 | super(); |
52 | } |
53 | |
54 | /** |
55 | * <!-- begin-user-doc --> |
56 | * <!-- end-user-doc --> |
57 | * @generated |
58 | */ |
59 | @Override |
60 | protected EClass eStaticClass() { |
61 | return SensitivityPackage.Literals.SINGLE_SENSITIVITY_PARAMETER; |
62 | } |
63 | |
64 | /** |
65 | * <!-- begin-user-doc --> |
66 | * <!-- end-user-doc --> |
67 | * @generated |
68 | */ |
69 | public SensitivityParameterVariation getSensitivityParameterVariation__SingleSensitivityParameter() { |
70 | return sensitivityParameterVariation__SingleSensitivityParameter; |
71 | } |
72 | |
73 | /** |
74 | * <!-- begin-user-doc --> |
75 | * <!-- end-user-doc --> |
76 | * @generated |
77 | */ |
78 | public NotificationChain basicSetSensitivityParameterVariation__SingleSensitivityParameter(SensitivityParameterVariation newSensitivityParameterVariation__SingleSensitivityParameter, NotificationChain msgs) { |
79 | SensitivityParameterVariation oldSensitivityParameterVariation__SingleSensitivityParameter = sensitivityParameterVariation__SingleSensitivityParameter; |
80 | sensitivityParameterVariation__SingleSensitivityParameter = newSensitivityParameterVariation__SingleSensitivityParameter; |
81 | if (eNotificationRequired()) { |
82 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER, oldSensitivityParameterVariation__SingleSensitivityParameter, newSensitivityParameterVariation__SingleSensitivityParameter); |
83 | if (msgs == null) msgs = notification; else msgs.add(notification); |
84 | } |
85 | return msgs; |
86 | } |
87 | |
88 | /** |
89 | * <!-- begin-user-doc --> |
90 | * <!-- end-user-doc --> |
91 | * @generated |
92 | */ |
93 | public void setSensitivityParameterVariation__SingleSensitivityParameter(SensitivityParameterVariation newSensitivityParameterVariation__SingleSensitivityParameter) { |
94 | if (newSensitivityParameterVariation__SingleSensitivityParameter != sensitivityParameterVariation__SingleSensitivityParameter) { |
95 | NotificationChain msgs = null; |
96 | if (sensitivityParameterVariation__SingleSensitivityParameter != null) |
97 | msgs = ((InternalEObject)sensitivityParameterVariation__SingleSensitivityParameter).eInverseRemove(this, SensitivityPackage.SENSITIVITY_PARAMETER_VARIATION__SINGLE_SENSITIVITY_PARAMETER_SENSITIVITY_PARAMETER_VARIATION, SensitivityParameterVariation.class, msgs); |
98 | if (newSensitivityParameterVariation__SingleSensitivityParameter != null) |
99 | msgs = ((InternalEObject)newSensitivityParameterVariation__SingleSensitivityParameter).eInverseAdd(this, SensitivityPackage.SENSITIVITY_PARAMETER_VARIATION__SINGLE_SENSITIVITY_PARAMETER_SENSITIVITY_PARAMETER_VARIATION, SensitivityParameterVariation.class, msgs); |
100 | msgs = basicSetSensitivityParameterVariation__SingleSensitivityParameter(newSensitivityParameterVariation__SingleSensitivityParameter, msgs); |
101 | if (msgs != null) msgs.dispatch(); |
102 | } |
103 | else if (eNotificationRequired()) |
104 | eNotify(new ENotificationImpl(this, Notification.SET, SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER, newSensitivityParameterVariation__SingleSensitivityParameter, newSensitivityParameterVariation__SingleSensitivityParameter)); |
105 | } |
106 | |
107 | /** |
108 | * <!-- begin-user-doc --> |
109 | * <!-- end-user-doc --> |
110 | * @generated |
111 | */ |
112 | @Override |
113 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
114 | switch (featureID) { |
115 | case SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER: |
116 | if (sensitivityParameterVariation__SingleSensitivityParameter != null) |
117 | msgs = ((InternalEObject)sensitivityParameterVariation__SingleSensitivityParameter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER, null, msgs); |
118 | return basicSetSensitivityParameterVariation__SingleSensitivityParameter((SensitivityParameterVariation)otherEnd, msgs); |
119 | } |
120 | return super.eInverseAdd(otherEnd, featureID, msgs); |
121 | } |
122 | |
123 | /** |
124 | * <!-- begin-user-doc --> |
125 | * <!-- end-user-doc --> |
126 | * @generated |
127 | */ |
128 | @Override |
129 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
130 | switch (featureID) { |
131 | case SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER: |
132 | return basicSetSensitivityParameterVariation__SingleSensitivityParameter(null, msgs); |
133 | } |
134 | return super.eInverseRemove(otherEnd, featureID, msgs); |
135 | } |
136 | |
137 | /** |
138 | * <!-- begin-user-doc --> |
139 | * <!-- end-user-doc --> |
140 | * @generated |
141 | */ |
142 | @Override |
143 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
144 | switch (featureID) { |
145 | case SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER: |
146 | return getSensitivityParameterVariation__SingleSensitivityParameter(); |
147 | } |
148 | return super.eGet(featureID, resolve, coreType); |
149 | } |
150 | |
151 | /** |
152 | * <!-- begin-user-doc --> |
153 | * <!-- end-user-doc --> |
154 | * @generated |
155 | */ |
156 | @Override |
157 | public void eSet(int featureID, Object newValue) { |
158 | switch (featureID) { |
159 | case SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER: |
160 | setSensitivityParameterVariation__SingleSensitivityParameter((SensitivityParameterVariation)newValue); |
161 | return; |
162 | } |
163 | super.eSet(featureID, newValue); |
164 | } |
165 | |
166 | /** |
167 | * <!-- begin-user-doc --> |
168 | * <!-- end-user-doc --> |
169 | * @generated |
170 | */ |
171 | @Override |
172 | public void eUnset(int featureID) { |
173 | switch (featureID) { |
174 | case SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER: |
175 | setSensitivityParameterVariation__SingleSensitivityParameter((SensitivityParameterVariation)null); |
176 | return; |
177 | } |
178 | super.eUnset(featureID); |
179 | } |
180 | |
181 | /** |
182 | * <!-- begin-user-doc --> |
183 | * <!-- end-user-doc --> |
184 | * @generated |
185 | */ |
186 | @Override |
187 | public boolean eIsSet(int featureID) { |
188 | switch (featureID) { |
189 | case SensitivityPackage.SINGLE_SENSITIVITY_PARAMETER__SENSITIVITY_PARAMETER_VARIATION_SINGLE_SENSITIVITY_PARAMETER: |
190 | return sensitivityParameterVariation__SingleSensitivityParameter != null; |
191 | } |
192 | return super.eIsSet(featureID); |
193 | } |
194 | |
195 | } //SingleSensitivityParameterImpl |