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