diff options
Diffstat (limited to 'Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java')
-rw-r--r-- | Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java | 183 |
1 files changed, 183 insertions, 0 deletions
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java new file mode 100644 index 00000000..66ab2a8f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java | |||
@@ -0,0 +1,183 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; | ||
4 | |||
5 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement; | ||
6 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; | ||
7 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State; | ||
8 | import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; | ||
9 | |||
10 | import java.util.Collection; | ||
11 | |||
12 | import org.eclipse.emf.common.notify.NotificationChain; | ||
13 | |||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | |||
16 | import org.eclipse.emf.ecore.EClass; | ||
17 | import org.eclipse.emf.ecore.InternalEObject; | ||
18 | |||
19 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
20 | import org.eclipse.emf.ecore.util.InternalEList; | ||
21 | |||
22 | /** | ||
23 | * <!-- begin-user-doc --> | ||
24 | * An implementation of the model object '<em><b>State</b></em>'. | ||
25 | * <!-- end-user-doc --> | ||
26 | * <p> | ||
27 | * The following features are implemented: | ||
28 | * </p> | ||
29 | * <ul> | ||
30 | * <li>{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StateImpl#getRegions <em>Regions</em>}</li> | ||
31 | * </ul> | ||
32 | * | ||
33 | * @generated | ||
34 | */ | ||
35 | public class StateImpl extends RegularStateImpl implements State { | ||
36 | /** | ||
37 | * The cached value of the '{@link #getRegions() <em>Regions</em>}' containment reference list. | ||
38 | * <!-- begin-user-doc --> | ||
39 | * <!-- end-user-doc --> | ||
40 | * @see #getRegions() | ||
41 | * @generated | ||
42 | * @ordered | ||
43 | */ | ||
44 | protected EList<Region> regions; | ||
45 | |||
46 | /** | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @generated | ||
50 | */ | ||
51 | protected StateImpl() { | ||
52 | super(); | ||
53 | } | ||
54 | |||
55 | /** | ||
56 | * <!-- begin-user-doc --> | ||
57 | * <!-- end-user-doc --> | ||
58 | * @generated | ||
59 | */ | ||
60 | @Override | ||
61 | protected EClass eStaticClass() { | ||
62 | return yakinduPackage.Literals.STATE; | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @generated | ||
69 | */ | ||
70 | public EList<Region> getRegions() { | ||
71 | if (regions == null) { | ||
72 | regions = new EObjectContainmentEList<Region>(Region.class, this, yakinduPackage.STATE__REGIONS); | ||
73 | } | ||
74 | return regions; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | @Override | ||
83 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
84 | switch (featureID) { | ||
85 | case yakinduPackage.STATE__REGIONS: | ||
86 | return ((InternalEList<?>)getRegions()).basicRemove(otherEnd, msgs); | ||
87 | } | ||
88 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
98 | switch (featureID) { | ||
99 | case yakinduPackage.STATE__REGIONS: | ||
100 | return getRegions(); | ||
101 | } | ||
102 | return super.eGet(featureID, resolve, coreType); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @SuppressWarnings("unchecked") | ||
111 | @Override | ||
112 | public void eSet(int featureID, Object newValue) { | ||
113 | switch (featureID) { | ||
114 | case yakinduPackage.STATE__REGIONS: | ||
115 | getRegions().clear(); | ||
116 | getRegions().addAll((Collection<? extends Region>)newValue); | ||
117 | return; | ||
118 | } | ||
119 | super.eSet(featureID, newValue); | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * <!-- begin-user-doc --> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @generated | ||
126 | */ | ||
127 | @Override | ||
128 | public void eUnset(int featureID) { | ||
129 | switch (featureID) { | ||
130 | case yakinduPackage.STATE__REGIONS: | ||
131 | getRegions().clear(); | ||
132 | return; | ||
133 | } | ||
134 | super.eUnset(featureID); | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * <!-- begin-user-doc --> | ||
139 | * <!-- end-user-doc --> | ||
140 | * @generated | ||
141 | */ | ||
142 | @Override | ||
143 | public boolean eIsSet(int featureID) { | ||
144 | switch (featureID) { | ||
145 | case yakinduPackage.STATE__REGIONS: | ||
146 | return regions != null && !regions.isEmpty(); | ||
147 | } | ||
148 | return super.eIsSet(featureID); | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | */ | ||
156 | @Override | ||
157 | public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) { | ||
158 | if (baseClass == CompositeElement.class) { | ||
159 | switch (derivedFeatureID) { | ||
160 | case yakinduPackage.STATE__REGIONS: return yakinduPackage.COMPOSITE_ELEMENT__REGIONS; | ||
161 | default: return -1; | ||
162 | } | ||
163 | } | ||
164 | return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); | ||
165 | } | ||
166 | |||
167 | /** | ||
168 | * <!-- begin-user-doc --> | ||
169 | * <!-- end-user-doc --> | ||
170 | * @generated | ||
171 | */ | ||
172 | @Override | ||
173 | public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) { | ||
174 | if (baseClass == CompositeElement.class) { | ||
175 | switch (baseFeatureID) { | ||
176 | case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: return yakinduPackage.STATE__REGIONS; | ||
177 | default: return -1; | ||
178 | } | ||
179 | } | ||
180 | return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); | ||
181 | } | ||
182 | |||
183 | } //StateImpl | ||