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