EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.featuremodel.impl]

COVERAGE SUMMARY FOR SOURCE FILE [FeatureGroupImpl.java]

nameclass, %method, %block, %line, %
FeatureGroupImpl.java0%   (0/1)0%   (0/19)0%   (0/491)0%   (0/133)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FeatureGroupImpl0%   (0/1)0%   (0/19)0%   (0/491)0%   (0/133)
<static initializer> 0%   (0/1)0%   (0/3)0%   (0/2)
ALLImpliesCardinalitiesToBeMinusOne (DiagnosticChain, Map): boolean 0%   (0/1)0%   (0/62)0%   (0/17)
FeatureGroupImpl (): void 0%   (0/1)0%   (0/9)0%   (0/4)
ORImpliesCardinalitiesMinToBeOneAndMaxToBeMinusOne (DiagnosticChain, Map): bo... 0%   (0/1)0%   (0/62)0%   (0/17)
XORImpliesCardinalitiesToBeOne (DiagnosticChain, Map): boolean 0%   (0/1)0%   (0/62)0%   (0/17)
XORorORImpliesChildrenAreMandatory (DiagnosticChain, Map): boolean 0%   (0/1)0%   (0/62)0%   (0/17)
eGet (int, boolean, boolean): Object 0%   (0/1)0%   (0/19)0%   (0/5)
eInverseAdd (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eInverseRemove (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eIsSet (int): boolean 0%   (0/1)0%   (0/33)0%   (0/5)
eSet (int, Object): void 0%   (0/1)0%   (0/29)0%   (0/10)
eStaticClass (): EClass 0%   (0/1)0%   (0/2)0%   (0/1)
eUnset (int): void 0%   (0/1)0%   (0/18)0%   (0/9)
getChildren (): EList 0%   (0/1)0%   (0/15)0%   (0/3)
getMax (): int 0%   (0/1)0%   (0/3)0%   (0/1)
getMin (): int 0%   (0/1)0%   (0/3)0%   (0/1)
setMax (int): void 0%   (0/1)0%   (0/21)0%   (0/5)
setMin (int): void 0%   (0/1)0%   (0/21)0%   (0/5)
toString (): String 0%   (0/1)0%   (0/37)0%   (0/8)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.featuremodel.impl;
8 
9import java.util.Collection;
10import java.util.Map;
11 
12import org.eclipse.emf.common.notify.Notification;
13import org.eclipse.emf.common.notify.NotificationChain;
14import org.eclipse.emf.common.util.BasicDiagnostic;
15import org.eclipse.emf.common.util.Diagnostic;
16import org.eclipse.emf.common.util.DiagnosticChain;
17import org.eclipse.emf.common.util.EList;
18import org.eclipse.emf.ecore.EClass;
19import org.eclipse.emf.ecore.InternalEObject;
20import org.eclipse.emf.ecore.impl.ENotificationImpl;
21import org.eclipse.emf.ecore.plugin.EcorePlugin;
22import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
23import org.eclipse.emf.ecore.util.EObjectContainmentEList;
24import org.eclipse.emf.ecore.util.EObjectValidator;
25import org.eclipse.emf.ecore.util.InternalEList;
26import org.eclipse.ocl.ParserException;
27import org.eclipse.ocl.ecore.Constraint;
28import org.eclipse.ocl.ecore.OCL;
29 
30import de.uka.ipd.sdq.featuremodel.Feature;
31import de.uka.ipd.sdq.featuremodel.FeatureGroup;
32import de.uka.ipd.sdq.featuremodel.featuremodelPackage;
33import de.uka.ipd.sdq.featuremodel.util.featuremodelValidator;
34 
35/**
36 * <!-- begin-user-doc -->
37 * An implementation of the model object '<em><b>Feature Group</b></em>'.
38 * <!-- end-user-doc -->
39 * <p>
40 * The following features are implemented:
41 * <ul>
42 *   <li>{@link de.uka.ipd.sdq.featuremodel.impl.FeatureGroupImpl#getMin <em>Min</em>}</li>
43 *   <li>{@link de.uka.ipd.sdq.featuremodel.impl.FeatureGroupImpl#getMax <em>Max</em>}</li>
44 *   <li>{@link de.uka.ipd.sdq.featuremodel.impl.FeatureGroupImpl#getChildren <em>Children</em>}</li>
45 * </ul>
46 * </p>
47 *
48 * @generated
49 */
50public class FeatureGroupImpl extends ChildRelationImpl implements FeatureGroup {
51        /**
52         * The default value of the '{@link #getMin() <em>Min</em>}' attribute.
53         * <!-- begin-user-doc -->
54         * <!-- end-user-doc -->
55         * @see #getMin()
56         * @generated
57         * @ordered
58         */
59        protected static final int MIN_EDEFAULT = 1;
60 
61        /**
62         * The cached value of the '{@link #getMin() <em>Min</em>}' attribute.
63         * <!-- begin-user-doc -->
64         * <!-- end-user-doc -->
65         * @see #getMin()
66         * @generated
67         * @ordered
68         */
69        protected int min = MIN_EDEFAULT;
70 
71        /**
72         * The default value of the '{@link #getMax() <em>Max</em>}' attribute.
73         * <!-- begin-user-doc -->
74         * <!-- end-user-doc -->
75         * @see #getMax()
76         * @generated
77         * @ordered
78         */
79        protected static final int MAX_EDEFAULT = 1;
80 
81        /**
82         * The cached value of the '{@link #getMax() <em>Max</em>}' attribute.
83         * <!-- begin-user-doc -->
84         * <!-- end-user-doc -->
85         * @see #getMax()
86         * @generated
87         * @ordered
88         */
89        protected int max = MAX_EDEFAULT;
90 
91        /**
92         * The cached value of the '{@link #getChildren() <em>Children</em>}' containment reference list.
93         * <!-- begin-user-doc -->
94         * <!-- end-user-doc -->
95         * @see #getChildren()
96         * @generated
97         * @ordered
98         */
99        protected EList<Feature> children;
100 
101        /**
102         * <!-- begin-user-doc -->
103         * <!-- end-user-doc -->
104         * @generated
105         */
106        protected FeatureGroupImpl() {
107                super();
108        }
109 
110        /**
111         * <!-- begin-user-doc -->
112         * <!-- end-user-doc -->
113         * @generated
114         */
115        @Override
116        protected EClass eStaticClass() {
117                return featuremodelPackage.Literals.FEATURE_GROUP;
118        }
119 
120        /**
121         * <!-- begin-user-doc -->
122         * <!-- end-user-doc -->
123         * @generated
124         */
125        public int getMin() {
126                return min;
127        }
128 
129        /**
130         * <!-- begin-user-doc -->
131         * <!-- end-user-doc -->
132         * @generated
133         */
134        public void setMin(int newMin) {
135                int oldMin = min;
136                min = newMin;
137                if (eNotificationRequired())
138                        eNotify(new ENotificationImpl(this, Notification.SET, featuremodelPackage.FEATURE_GROUP__MIN, oldMin, min));
139        }
140 
141        /**
142         * <!-- begin-user-doc -->
143         * <!-- end-user-doc -->
144         * @generated
145         */
146        public int getMax() {
147                return max;
148        }
149 
150        /**
151         * <!-- begin-user-doc -->
152         * <!-- end-user-doc -->
153         * @generated
154         */
155        public void setMax(int newMax) {
156                int oldMax = max;
157                max = newMax;
158                if (eNotificationRequired())
159                        eNotify(new ENotificationImpl(this, Notification.SET, featuremodelPackage.FEATURE_GROUP__MAX, oldMax, max));
160        }
161 
162        /**
163         * <!-- begin-user-doc -->
164         * <!-- end-user-doc -->
165         * @generated
166         */
167        public EList<Feature> getChildren() {
168                if (children == null) {
169                        children = new EObjectContainmentWithInverseEList<Feature>(Feature.class, this, featuremodelPackage.FEATURE_GROUP__CHILDREN, featuremodelPackage.FEATURE__FEATUREGROUP);
170                }
171                return children;
172        }
173 
174        /**
175         * The cached OCL expression body for the '{@link #XORorORImpliesChildrenAreMandatory(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>XO Ror OR Implies Children Are Mandatory</em>}' operation.
176         * <!-- begin-user-doc -->
177         * <!-- end-user-doc -->
178         * @see #XORorORImpliesChildrenAreMandatory(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
179         * @generated
180         * @ordered
181         */
182        protected static final String XO_ROR_OR_IMPLIES_CHILDREN_ARE_MANDATORY__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "true "+
183"--(self.groupType = GroupTypes::OR or self.groupType = GroupTypes::XOR) implies self.children->forAll(c|c.isMandatory)";
184 
185        /**
186         * The cached OCL invariant for the '{@link #XORorORImpliesChildrenAreMandatory(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>XO Ror OR Implies Children Are Mandatory</em>}' invariant operation.
187         * <!-- begin-user-doc -->
188         * <!-- end-user-doc -->
189         * @see #XORorORImpliesChildrenAreMandatory(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
190         * @generated
191         * @ordered
192         */
193        protected static Constraint XO_ROR_OR_IMPLIES_CHILDREN_ARE_MANDATORY__DIAGNOSTIC_CHAIN_MAP__EOCL_INV;
194 
195        /**
196         * <!-- begin-user-doc -->
197         * <!-- end-user-doc -->
198         * @generated
199         */
200        public boolean XORorORImpliesChildrenAreMandatory(DiagnosticChain diagnostics, Map<Object, Object> context) {
201                if (XO_ROR_OR_IMPLIES_CHILDREN_ARE_MANDATORY__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
202                        OCL.Helper helper = EOCL_ENV.createOCLHelper();
203                        helper.setContext(featuremodelPackage.Literals.FEATURE_GROUP);
204                        try {
205                                XO_ROR_OR_IMPLIES_CHILDREN_ARE_MANDATORY__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(XO_ROR_OR_IMPLIES_CHILDREN_ARE_MANDATORY__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
206                        }
207                        catch (ParserException pe) {
208                                throw new UnsupportedOperationException(pe.getLocalizedMessage());
209                        }
210                }
211                if (!EOCL_ENV.createQuery(XO_ROR_OR_IMPLIES_CHILDREN_ARE_MANDATORY__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) {
212                        if (diagnostics != null) {
213                                diagnostics.add
214                                        (new BasicDiagnostic
215                                                (Diagnostic.ERROR,
216                                                 featuremodelValidator.DIAGNOSTIC_SOURCE,
217                                                 featuremodelValidator.FEATURE_GROUP__XO_ROR_OR_IMPLIES_CHILDREN_ARE_MANDATORY,
218                                                 EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "XORorORImpliesChildrenAreMandatory", EObjectValidator.getObjectLabel(this, context) }),
219                                                 new Object [] { this }));
220                        }
221                        return false;
222                }
223                return true;
224        }
225 
226        /**
227         * The cached OCL expression body for the '{@link #ALLImpliesCardinalitiesToBeMinusOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>ALL Implies Cardinalities To Be Minus One</em>}' operation.
228         * <!-- begin-user-doc -->
229         * <!-- end-user-doc -->
230         * @see #ALLImpliesCardinalitiesToBeMinusOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
231         * @generated
232         * @ordered
233         */
234        protected static final String ALL_IMPLIES_CARDINALITIES_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "true "+
235" --self.groupType = GroupTypes::ALL implies (self.min = -1 and self.max = -1)";
236 
237        /**
238         * The cached OCL invariant for the '{@link #ALLImpliesCardinalitiesToBeMinusOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>ALL Implies Cardinalities To Be Minus One</em>}' invariant operation.
239         * <!-- begin-user-doc -->
240         * <!-- end-user-doc -->
241         * @see #ALLImpliesCardinalitiesToBeMinusOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
242         * @generated
243         * @ordered
244         */
245        protected static Constraint ALL_IMPLIES_CARDINALITIES_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV;
246 
247        /**
248         * <!-- begin-user-doc -->
249         * <!-- end-user-doc -->
250         * @generated
251         */
252        public boolean ALLImpliesCardinalitiesToBeMinusOne(DiagnosticChain diagnostics, Map<Object, Object> context) {
253                if (ALL_IMPLIES_CARDINALITIES_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
254                        OCL.Helper helper = EOCL_ENV.createOCLHelper();
255                        helper.setContext(featuremodelPackage.Literals.FEATURE_GROUP);
256                        try {
257                                ALL_IMPLIES_CARDINALITIES_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(ALL_IMPLIES_CARDINALITIES_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
258                        }
259                        catch (ParserException pe) {
260                                throw new UnsupportedOperationException(pe.getLocalizedMessage());
261                        }
262                }
263                if (!EOCL_ENV.createQuery(ALL_IMPLIES_CARDINALITIES_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) {
264                        if (diagnostics != null) {
265                                diagnostics.add
266                                        (new BasicDiagnostic
267                                                (Diagnostic.ERROR,
268                                                 featuremodelValidator.DIAGNOSTIC_SOURCE,
269                                                 featuremodelValidator.FEATURE_GROUP__ALL_IMPLIES_CARDINALITIES_TO_BE_MINUS_ONE,
270                                                 EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "ALLImpliesCardinalitiesToBeMinusOne", EObjectValidator.getObjectLabel(this, context) }),
271                                                 new Object [] { this }));
272                        }
273                        return false;
274                }
275                return true;
276        }
277 
278        /**
279         * The cached OCL expression body for the '{@link #ORImpliesCardinalitiesMinToBeOneAndMaxToBeMinusOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>OR Implies Cardinalities Min To Be One And Max To Be Minus One</em>}' operation.
280         * <!-- begin-user-doc -->
281         * <!-- end-user-doc -->
282         * @see #ORImpliesCardinalitiesMinToBeOneAndMaxToBeMinusOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
283         * @generated
284         * @ordered
285         */
286        protected static final String OR_IMPLIES_CARDINALITIES_MIN_TO_BE_ONE_AND_MAX_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "true "+
287"--self.groupType = GroupTypes::OR implies (self.min = 1  and self.max = -1)";
288 
289        /**
290         * The cached OCL invariant for the '{@link #ORImpliesCardinalitiesMinToBeOneAndMaxToBeMinusOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>OR Implies Cardinalities Min To Be One And Max To Be Minus One</em>}' invariant operation.
291         * <!-- begin-user-doc -->
292         * <!-- end-user-doc -->
293         * @see #ORImpliesCardinalitiesMinToBeOneAndMaxToBeMinusOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
294         * @generated
295         * @ordered
296         */
297        protected static Constraint OR_IMPLIES_CARDINALITIES_MIN_TO_BE_ONE_AND_MAX_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV;
298 
299        /**
300         * <!-- begin-user-doc -->
301         * <!-- end-user-doc -->
302         * @generated
303         */
304        public boolean ORImpliesCardinalitiesMinToBeOneAndMaxToBeMinusOne(DiagnosticChain diagnostics, Map<Object, Object> context) {
305                if (OR_IMPLIES_CARDINALITIES_MIN_TO_BE_ONE_AND_MAX_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
306                        OCL.Helper helper = EOCL_ENV.createOCLHelper();
307                        helper.setContext(featuremodelPackage.Literals.FEATURE_GROUP);
308                        try {
309                                OR_IMPLIES_CARDINALITIES_MIN_TO_BE_ONE_AND_MAX_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(OR_IMPLIES_CARDINALITIES_MIN_TO_BE_ONE_AND_MAX_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
310                        }
311                        catch (ParserException pe) {
312                                throw new UnsupportedOperationException(pe.getLocalizedMessage());
313                        }
314                }
315                if (!EOCL_ENV.createQuery(OR_IMPLIES_CARDINALITIES_MIN_TO_BE_ONE_AND_MAX_TO_BE_MINUS_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) {
316                        if (diagnostics != null) {
317                                diagnostics.add
318                                        (new BasicDiagnostic
319                                                (Diagnostic.ERROR,
320                                                 featuremodelValidator.DIAGNOSTIC_SOURCE,
321                                                 featuremodelValidator.FEATURE_GROUP__OR_IMPLIES_CARDINALITIES_MIN_TO_BE_ONE_AND_MAX_TO_BE_MINUS_ONE,
322                                                 EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "ORImpliesCardinalitiesMinToBeOneAndMaxToBeMinusOne", EObjectValidator.getObjectLabel(this, context) }),
323                                                 new Object [] { this }));
324                        }
325                        return false;
326                }
327                return true;
328        }
329 
330        /**
331         * The cached OCL expression body for the '{@link #XORImpliesCardinalitiesToBeOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>XOR Implies Cardinalities To Be One</em>}' operation.
332         * <!-- begin-user-doc -->
333         * <!-- end-user-doc -->
334         * @see #XORImpliesCardinalitiesToBeOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
335         * @generated
336         * @ordered
337         */
338        protected static final String XOR_IMPLIES_CARDINALITIES_TO_BE_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP = "true "+
339" --self.groupType = GroupTypes::XOR implies (self.min = 1 and self.max = 1)";
340 
341        /**
342         * The cached OCL invariant for the '{@link #XORImpliesCardinalitiesToBeOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map) <em>XOR Implies Cardinalities To Be One</em>}' invariant operation.
343         * <!-- begin-user-doc -->
344         * <!-- end-user-doc -->
345         * @see #XORImpliesCardinalitiesToBeOne(org.eclipse.emf.common.util.DiagnosticChain, java.util.Map)
346         * @generated
347         * @ordered
348         */
349        protected static Constraint XOR_IMPLIES_CARDINALITIES_TO_BE_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV;
350 
351        /**
352         * <!-- begin-user-doc -->
353         * <!-- end-user-doc -->
354         * @generated
355         */
356        public boolean XORImpliesCardinalitiesToBeOne(DiagnosticChain diagnostics, Map<Object, Object> context) {
357                if (XOR_IMPLIES_CARDINALITIES_TO_BE_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV == null) {
358                        OCL.Helper helper = EOCL_ENV.createOCLHelper();
359                        helper.setContext(featuremodelPackage.Literals.FEATURE_GROUP);
360                        try {
361                                XOR_IMPLIES_CARDINALITIES_TO_BE_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV = helper.createInvariant(XOR_IMPLIES_CARDINALITIES_TO_BE_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_EXP);
362                        }
363                        catch (ParserException pe) {
364                                throw new UnsupportedOperationException(pe.getLocalizedMessage());
365                        }
366                }
367                if (!EOCL_ENV.createQuery(XOR_IMPLIES_CARDINALITIES_TO_BE_ONE__DIAGNOSTIC_CHAIN_MAP__EOCL_INV).check(this)) {
368                        if (diagnostics != null) {
369                                diagnostics.add
370                                        (new BasicDiagnostic
371                                                (Diagnostic.ERROR,
372                                                 featuremodelValidator.DIAGNOSTIC_SOURCE,
373                                                 featuremodelValidator.FEATURE_GROUP__XOR_IMPLIES_CARDINALITIES_TO_BE_ONE,
374                                                 EcorePlugin.INSTANCE.getString("_UI_GenericInvariant_diagnostic", new Object[] { "XORImpliesCardinalitiesToBeOne", EObjectValidator.getObjectLabel(this, context) }),
375                                                 new Object [] { this }));
376                        }
377                        return false;
378                }
379                return true;
380        }
381 
382        /**
383         * <!-- begin-user-doc -->
384         * <!-- end-user-doc -->
385         * @generated
386         */
387        @SuppressWarnings("unchecked")
388        @Override
389        public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
390                switch (featureID) {
391                        case featuremodelPackage.FEATURE_GROUP__CHILDREN:
392                                return ((InternalEList<InternalEObject>)(InternalEList<?>)getChildren()).basicAdd(otherEnd, msgs);
393                }
394                return super.eInverseAdd(otherEnd, featureID, msgs);
395        }
396 
397        /**
398         * <!-- begin-user-doc -->
399         * <!-- end-user-doc -->
400         * @generated
401         */
402        @Override
403        public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
404                switch (featureID) {
405                        case featuremodelPackage.FEATURE_GROUP__CHILDREN:
406                                return ((InternalEList<?>)getChildren()).basicRemove(otherEnd, msgs);
407                }
408                return super.eInverseRemove(otherEnd, featureID, msgs);
409        }
410 
411        /**
412         * <!-- begin-user-doc -->
413         * <!-- end-user-doc -->
414         * @generated
415         */
416        @Override
417        public Object eGet(int featureID, boolean resolve, boolean coreType) {
418                switch (featureID) {
419                        case featuremodelPackage.FEATURE_GROUP__MIN:
420                                return getMin();
421                        case featuremodelPackage.FEATURE_GROUP__MAX:
422                                return getMax();
423                        case featuremodelPackage.FEATURE_GROUP__CHILDREN:
424                                return getChildren();
425                }
426                return super.eGet(featureID, resolve, coreType);
427        }
428 
429        /**
430         * <!-- begin-user-doc -->
431         * <!-- end-user-doc -->
432         * @generated
433         */
434        @SuppressWarnings("unchecked")
435        @Override
436        public void eSet(int featureID, Object newValue) {
437                switch (featureID) {
438                        case featuremodelPackage.FEATURE_GROUP__MIN:
439                                setMin((Integer)newValue);
440                                return;
441                        case featuremodelPackage.FEATURE_GROUP__MAX:
442                                setMax((Integer)newValue);
443                                return;
444                        case featuremodelPackage.FEATURE_GROUP__CHILDREN:
445                                getChildren().clear();
446                                getChildren().addAll((Collection<? extends Feature>)newValue);
447                                return;
448                }
449                super.eSet(featureID, newValue);
450        }
451 
452        /**
453         * <!-- begin-user-doc -->
454         * <!-- end-user-doc -->
455         * @generated
456         */
457        @Override
458        public void eUnset(int featureID) {
459                switch (featureID) {
460                        case featuremodelPackage.FEATURE_GROUP__MIN:
461                                setMin(MIN_EDEFAULT);
462                                return;
463                        case featuremodelPackage.FEATURE_GROUP__MAX:
464                                setMax(MAX_EDEFAULT);
465                                return;
466                        case featuremodelPackage.FEATURE_GROUP__CHILDREN:
467                                getChildren().clear();
468                                return;
469                }
470                super.eUnset(featureID);
471        }
472 
473        /**
474         * <!-- begin-user-doc -->
475         * <!-- end-user-doc -->
476         * @generated
477         */
478        @Override
479        public boolean eIsSet(int featureID) {
480                switch (featureID) {
481                        case featuremodelPackage.FEATURE_GROUP__MIN:
482                                return min != MIN_EDEFAULT;
483                        case featuremodelPackage.FEATURE_GROUP__MAX:
484                                return max != MAX_EDEFAULT;
485                        case featuremodelPackage.FEATURE_GROUP__CHILDREN:
486                                return children != null && !children.isEmpty();
487                }
488                return super.eIsSet(featureID);
489        }
490 
491        /**
492         * <!-- begin-user-doc -->
493         * <!-- end-user-doc -->
494         * @generated
495         */
496        @Override
497        public String toString() {
498                if (eIsProxy()) return super.toString();
499 
500                StringBuffer result = new StringBuffer(super.toString());
501                result.append(" (min: ");
502                result.append(min);
503                result.append(", max: ");
504                result.append(max);
505                result.append(')');
506                return result.toString();
507        }
508 
509        /**
510         * The cached environment for evaluating OCL expressions.
511         * <!-- begin-user-doc -->
512         * <!-- end-user-doc -->
513         * @generated
514         * @ordered
515         */
516        protected static final OCL EOCL_ENV = OCL.newInstance();
517 
518} //FeatureGroupImpl

[all classes][de.uka.ipd.sdq.featuremodel.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov