aboutsummaryrefslogtreecommitdiffstats
path: root/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/ListImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/ListImpl.java')
-rw-r--r--Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/ListImpl.java176
1 files changed, 176 insertions, 0 deletions
diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/ListImpl.java b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/ListImpl.java
new file mode 100644
index 00000000..30d006cd
--- /dev/null
+++ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/src/linkedList/impl/ListImpl.java
@@ -0,0 +1,176 @@
1/**
2 */
3package linkedList.impl;
4
5import linkedList.Element;
6import linkedList.LinkedListPackage;
7import linkedList.List;
8
9import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain;
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.emf.ecore.InternalEObject;
13
14import org.eclipse.emf.ecore.impl.ENotificationImpl;
15import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
16
17/**
18 * <!-- begin-user-doc -->
19 * An implementation of the model object '<em><b>List</b></em>'.
20 * <!-- end-user-doc -->
21 * <p>
22 * The following features are implemented:
23 * </p>
24 * <ul>
25 * <li>{@link linkedList.impl.ListImpl#getFirst <em>First</em>}</li>
26 * </ul>
27 *
28 * @generated
29 */
30public class ListImpl extends MinimalEObjectImpl.Container implements List {
31 /**
32 * The cached value of the '{@link #getFirst() <em>First</em>}' containment reference.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @see #getFirst()
36 * @generated
37 * @ordered
38 */
39 protected Element first;
40
41 /**
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @generated
45 */
46 protected ListImpl() {
47 super();
48 }
49
50 /**
51 * <!-- begin-user-doc -->
52 * <!-- end-user-doc -->
53 * @generated
54 */
55 @Override
56 protected EClass eStaticClass() {
57 return LinkedListPackage.Literals.LIST;
58 }
59
60 /**
61 * <!-- begin-user-doc -->
62 * <!-- end-user-doc -->
63 * @generated
64 */
65 public Element getFirst() {
66 return first;
67 }
68
69 /**
70 * <!-- begin-user-doc -->
71 * <!-- end-user-doc -->
72 * @generated
73 */
74 public NotificationChain basicSetFirst(Element newFirst, NotificationChain msgs) {
75 Element oldFirst = first;
76 first = newFirst;
77 if (eNotificationRequired()) {
78 ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LinkedListPackage.LIST__FIRST, oldFirst, newFirst);
79 if (msgs == null) msgs = notification; else msgs.add(notification);
80 }
81 return msgs;
82 }
83
84 /**
85 * <!-- begin-user-doc -->
86 * <!-- end-user-doc -->
87 * @generated
88 */
89 public void setFirst(Element newFirst) {
90 if (newFirst != first) {
91 NotificationChain msgs = null;
92 if (first != null)
93 msgs = ((InternalEObject)first).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LinkedListPackage.LIST__FIRST, null, msgs);
94 if (newFirst != null)
95 msgs = ((InternalEObject)newFirst).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LinkedListPackage.LIST__FIRST, null, msgs);
96 msgs = basicSetFirst(newFirst, msgs);
97 if (msgs != null) msgs.dispatch();
98 }
99 else if (eNotificationRequired())
100 eNotify(new ENotificationImpl(this, Notification.SET, LinkedListPackage.LIST__FIRST, newFirst, newFirst));
101 }
102
103 /**
104 * <!-- begin-user-doc -->
105 * <!-- end-user-doc -->
106 * @generated
107 */
108 @Override
109 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
110 switch (featureID) {
111 case LinkedListPackage.LIST__FIRST:
112 return basicSetFirst(null, msgs);
113 }
114 return super.eInverseRemove(otherEnd, featureID, msgs);
115 }
116
117 /**
118 * <!-- begin-user-doc -->
119 * <!-- end-user-doc -->
120 * @generated
121 */
122 @Override
123 public Object eGet(int featureID, boolean resolve, boolean coreType) {
124 switch (featureID) {
125 case LinkedListPackage.LIST__FIRST:
126 return getFirst();
127 }
128 return super.eGet(featureID, resolve, coreType);
129 }
130
131 /**
132 * <!-- begin-user-doc -->
133 * <!-- end-user-doc -->
134 * @generated
135 */
136 @SuppressWarnings("unchecked")
137 @Override
138 public void eSet(int featureID, Object newValue) {
139 switch (featureID) {
140 case LinkedListPackage.LIST__FIRST:
141 setFirst((Element)newValue);
142 return;
143 }
144 super.eSet(featureID, newValue);
145 }
146
147 /**
148 * <!-- begin-user-doc -->
149 * <!-- end-user-doc -->
150 * @generated
151 */
152 @Override
153 public void eUnset(int featureID) {
154 switch (featureID) {
155 case LinkedListPackage.LIST__FIRST:
156 setFirst((Element)null);
157 return;
158 }
159 super.eUnset(featureID);
160 }
161
162 /**
163 * <!-- begin-user-doc -->
164 * <!-- end-user-doc -->
165 * @generated
166 */
167 @Override
168 public boolean eIsSet(int featureID) {
169 switch (featureID) {
170 case LinkedListPackage.LIST__FIRST:
171 return first != null;
172 }
173 return super.eIsSet(featureID);
174 }
175
176} //ListImpl