1 | /** |
2 | * <copyright> |
3 | * </copyright> |
4 | * |
5 | * $Id$ |
6 | */ |
7 | package LqnCore.impl; |
8 | |
9 | import LqnCore.HistogramBinType; |
10 | import LqnCore.LqnCorePackage; |
11 | |
12 | import org.eclipse.emf.common.notify.Notification; |
13 | |
14 | import org.eclipse.emf.ecore.EClass; |
15 | |
16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
17 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
18 | |
19 | /** |
20 | * <!-- begin-user-doc --> |
21 | * An implementation of the model object '<em><b>Histogram Bin Type</b></em>'. |
22 | * <!-- end-user-doc --> |
23 | * <p> |
24 | * The following features are implemented: |
25 | * <ul> |
26 | * <li>{@link LqnCore.impl.HistogramBinTypeImpl#getBegin <em>Begin</em>}</li> |
27 | * <li>{@link LqnCore.impl.HistogramBinTypeImpl#getConf95 <em>Conf95</em>}</li> |
28 | * <li>{@link LqnCore.impl.HistogramBinTypeImpl#getConf99 <em>Conf99</em>}</li> |
29 | * <li>{@link LqnCore.impl.HistogramBinTypeImpl#getEnd <em>End</em>}</li> |
30 | * <li>{@link LqnCore.impl.HistogramBinTypeImpl#getProb <em>Prob</em>}</li> |
31 | * </ul> |
32 | * </p> |
33 | * |
34 | * @generated |
35 | */ |
36 | public class HistogramBinTypeImpl extends EObjectImpl implements HistogramBinType { |
37 | /** |
38 | * The default value of the '{@link #getBegin() <em>Begin</em>}' attribute. |
39 | * <!-- begin-user-doc --> |
40 | * <!-- end-user-doc --> |
41 | * @see #getBegin() |
42 | * @generated |
43 | * @ordered |
44 | */ |
45 | protected static final Object BEGIN_EDEFAULT = null; |
46 | |
47 | /** |
48 | * The cached value of the '{@link #getBegin() <em>Begin</em>}' attribute. |
49 | * <!-- begin-user-doc --> |
50 | * <!-- end-user-doc --> |
51 | * @see #getBegin() |
52 | * @generated |
53 | * @ordered |
54 | */ |
55 | protected Object begin = BEGIN_EDEFAULT; |
56 | |
57 | /** |
58 | * The default value of the '{@link #getConf95() <em>Conf95</em>}' attribute. |
59 | * <!-- begin-user-doc --> |
60 | * <!-- end-user-doc --> |
61 | * @see #getConf95() |
62 | * @generated |
63 | * @ordered |
64 | */ |
65 | protected static final Object CONF95_EDEFAULT = null; |
66 | |
67 | /** |
68 | * The cached value of the '{@link #getConf95() <em>Conf95</em>}' attribute. |
69 | * <!-- begin-user-doc --> |
70 | * <!-- end-user-doc --> |
71 | * @see #getConf95() |
72 | * @generated |
73 | * @ordered |
74 | */ |
75 | protected Object conf95 = CONF95_EDEFAULT; |
76 | |
77 | /** |
78 | * The default value of the '{@link #getConf99() <em>Conf99</em>}' attribute. |
79 | * <!-- begin-user-doc --> |
80 | * <!-- end-user-doc --> |
81 | * @see #getConf99() |
82 | * @generated |
83 | * @ordered |
84 | */ |
85 | protected static final Object CONF99_EDEFAULT = null; |
86 | |
87 | /** |
88 | * The cached value of the '{@link #getConf99() <em>Conf99</em>}' attribute. |
89 | * <!-- begin-user-doc --> |
90 | * <!-- end-user-doc --> |
91 | * @see #getConf99() |
92 | * @generated |
93 | * @ordered |
94 | */ |
95 | protected Object conf99 = CONF99_EDEFAULT; |
96 | |
97 | /** |
98 | * The default value of the '{@link #getEnd() <em>End</em>}' attribute. |
99 | * <!-- begin-user-doc --> |
100 | * <!-- end-user-doc --> |
101 | * @see #getEnd() |
102 | * @generated |
103 | * @ordered |
104 | */ |
105 | protected static final Object END_EDEFAULT = null; |
106 | |
107 | /** |
108 | * The cached value of the '{@link #getEnd() <em>End</em>}' attribute. |
109 | * <!-- begin-user-doc --> |
110 | * <!-- end-user-doc --> |
111 | * @see #getEnd() |
112 | * @generated |
113 | * @ordered |
114 | */ |
115 | protected Object end = END_EDEFAULT; |
116 | |
117 | /** |
118 | * The default value of the '{@link #getProb() <em>Prob</em>}' attribute. |
119 | * <!-- begin-user-doc --> |
120 | * <!-- end-user-doc --> |
121 | * @see #getProb() |
122 | * @generated |
123 | * @ordered |
124 | */ |
125 | protected static final Object PROB_EDEFAULT = null; |
126 | |
127 | /** |
128 | * The cached value of the '{@link #getProb() <em>Prob</em>}' attribute. |
129 | * <!-- begin-user-doc --> |
130 | * <!-- end-user-doc --> |
131 | * @see #getProb() |
132 | * @generated |
133 | * @ordered |
134 | */ |
135 | protected Object prob = PROB_EDEFAULT; |
136 | |
137 | /** |
138 | * <!-- begin-user-doc --> |
139 | * <!-- end-user-doc --> |
140 | * @generated |
141 | */ |
142 | protected HistogramBinTypeImpl() { |
143 | super(); |
144 | } |
145 | |
146 | /** |
147 | * <!-- begin-user-doc --> |
148 | * <!-- end-user-doc --> |
149 | * @generated |
150 | */ |
151 | @Override |
152 | protected EClass eStaticClass() { |
153 | return LqnCorePackage.Literals.HISTOGRAM_BIN_TYPE; |
154 | } |
155 | |
156 | /** |
157 | * <!-- begin-user-doc --> |
158 | * <!-- end-user-doc --> |
159 | * @generated |
160 | */ |
161 | public Object getBegin() { |
162 | return begin; |
163 | } |
164 | |
165 | /** |
166 | * <!-- begin-user-doc --> |
167 | * <!-- end-user-doc --> |
168 | * @generated |
169 | */ |
170 | public void setBegin(Object newBegin) { |
171 | Object oldBegin = begin; |
172 | begin = newBegin; |
173 | if (eNotificationRequired()) |
174 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.HISTOGRAM_BIN_TYPE__BEGIN, oldBegin, begin)); |
175 | } |
176 | |
177 | /** |
178 | * <!-- begin-user-doc --> |
179 | * <!-- end-user-doc --> |
180 | * @generated |
181 | */ |
182 | public Object getConf95() { |
183 | return conf95; |
184 | } |
185 | |
186 | /** |
187 | * <!-- begin-user-doc --> |
188 | * <!-- end-user-doc --> |
189 | * @generated |
190 | */ |
191 | public void setConf95(Object newConf95) { |
192 | Object oldConf95 = conf95; |
193 | conf95 = newConf95; |
194 | if (eNotificationRequired()) |
195 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF95, oldConf95, conf95)); |
196 | } |
197 | |
198 | /** |
199 | * <!-- begin-user-doc --> |
200 | * <!-- end-user-doc --> |
201 | * @generated |
202 | */ |
203 | public Object getConf99() { |
204 | return conf99; |
205 | } |
206 | |
207 | /** |
208 | * <!-- begin-user-doc --> |
209 | * <!-- end-user-doc --> |
210 | * @generated |
211 | */ |
212 | public void setConf99(Object newConf99) { |
213 | Object oldConf99 = conf99; |
214 | conf99 = newConf99; |
215 | if (eNotificationRequired()) |
216 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF99, oldConf99, conf99)); |
217 | } |
218 | |
219 | /** |
220 | * <!-- begin-user-doc --> |
221 | * <!-- end-user-doc --> |
222 | * @generated |
223 | */ |
224 | public Object getEnd() { |
225 | return end; |
226 | } |
227 | |
228 | /** |
229 | * <!-- begin-user-doc --> |
230 | * <!-- end-user-doc --> |
231 | * @generated |
232 | */ |
233 | public void setEnd(Object newEnd) { |
234 | Object oldEnd = end; |
235 | end = newEnd; |
236 | if (eNotificationRequired()) |
237 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.HISTOGRAM_BIN_TYPE__END, oldEnd, end)); |
238 | } |
239 | |
240 | /** |
241 | * <!-- begin-user-doc --> |
242 | * <!-- end-user-doc --> |
243 | * @generated |
244 | */ |
245 | public Object getProb() { |
246 | return prob; |
247 | } |
248 | |
249 | /** |
250 | * <!-- begin-user-doc --> |
251 | * <!-- end-user-doc --> |
252 | * @generated |
253 | */ |
254 | public void setProb(Object newProb) { |
255 | Object oldProb = prob; |
256 | prob = newProb; |
257 | if (eNotificationRequired()) |
258 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.HISTOGRAM_BIN_TYPE__PROB, oldProb, prob)); |
259 | } |
260 | |
261 | /** |
262 | * <!-- begin-user-doc --> |
263 | * <!-- end-user-doc --> |
264 | * @generated |
265 | */ |
266 | @Override |
267 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
268 | switch (featureID) { |
269 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__BEGIN: |
270 | return getBegin(); |
271 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF95: |
272 | return getConf95(); |
273 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF99: |
274 | return getConf99(); |
275 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__END: |
276 | return getEnd(); |
277 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__PROB: |
278 | return getProb(); |
279 | } |
280 | return super.eGet(featureID, resolve, coreType); |
281 | } |
282 | |
283 | /** |
284 | * <!-- begin-user-doc --> |
285 | * <!-- end-user-doc --> |
286 | * @generated |
287 | */ |
288 | @Override |
289 | public void eSet(int featureID, Object newValue) { |
290 | switch (featureID) { |
291 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__BEGIN: |
292 | setBegin(newValue); |
293 | return; |
294 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF95: |
295 | setConf95(newValue); |
296 | return; |
297 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF99: |
298 | setConf99(newValue); |
299 | return; |
300 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__END: |
301 | setEnd(newValue); |
302 | return; |
303 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__PROB: |
304 | setProb(newValue); |
305 | return; |
306 | } |
307 | super.eSet(featureID, newValue); |
308 | } |
309 | |
310 | /** |
311 | * <!-- begin-user-doc --> |
312 | * <!-- end-user-doc --> |
313 | * @generated |
314 | */ |
315 | @Override |
316 | public void eUnset(int featureID) { |
317 | switch (featureID) { |
318 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__BEGIN: |
319 | setBegin(BEGIN_EDEFAULT); |
320 | return; |
321 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF95: |
322 | setConf95(CONF95_EDEFAULT); |
323 | return; |
324 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF99: |
325 | setConf99(CONF99_EDEFAULT); |
326 | return; |
327 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__END: |
328 | setEnd(END_EDEFAULT); |
329 | return; |
330 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__PROB: |
331 | setProb(PROB_EDEFAULT); |
332 | return; |
333 | } |
334 | super.eUnset(featureID); |
335 | } |
336 | |
337 | /** |
338 | * <!-- begin-user-doc --> |
339 | * <!-- end-user-doc --> |
340 | * @generated |
341 | */ |
342 | @Override |
343 | public boolean eIsSet(int featureID) { |
344 | switch (featureID) { |
345 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__BEGIN: |
346 | return BEGIN_EDEFAULT == null ? begin != null : !BEGIN_EDEFAULT.equals(begin); |
347 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF95: |
348 | return CONF95_EDEFAULT == null ? conf95 != null : !CONF95_EDEFAULT.equals(conf95); |
349 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__CONF99: |
350 | return CONF99_EDEFAULT == null ? conf99 != null : !CONF99_EDEFAULT.equals(conf99); |
351 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__END: |
352 | return END_EDEFAULT == null ? end != null : !END_EDEFAULT.equals(end); |
353 | case LqnCorePackage.HISTOGRAM_BIN_TYPE__PROB: |
354 | return PROB_EDEFAULT == null ? prob != null : !PROB_EDEFAULT.equals(prob); |
355 | } |
356 | return super.eIsSet(featureID); |
357 | } |
358 | |
359 | /** |
360 | * <!-- begin-user-doc --> |
361 | * <!-- end-user-doc --> |
362 | * @generated |
363 | */ |
364 | @Override |
365 | public String toString() { |
366 | if (eIsProxy()) return super.toString(); |
367 | |
368 | StringBuffer result = new StringBuffer(super.toString()); |
369 | result.append(" (begin: "); |
370 | result.append(begin); |
371 | result.append(", conf95: "); |
372 | result.append(conf95); |
373 | result.append(", conf99: "); |
374 | result.append(conf99); |
375 | result.append(", end: "); |
376 | result.append(end); |
377 | result.append(", prob: "); |
378 | result.append(prob); |
379 | result.append(')'); |
380 | return result.toString(); |
381 | } |
382 | |
383 | } //HistogramBinTypeImpl |