diff options
author | 2019-04-08 00:58:00 +0200 | |
---|---|---|
committer | 2019-04-08 00:58:00 +0200 | |
commit | c1f185fd8fc2c3dfc123d9271726c588963c7c01 (patch) | |
tree | 88a5bb94017e7d3f0fbce0a51a78c2549b0977bd /Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/CostEntryImpl.java | |
parent | Infrastructure for objective functions (diff) | |
download | VIATRA-Generator-c1f185fd8fc2c3dfc123d9271726c588963c7c01.tar.gz VIATRA-Generator-c1f185fd8fc2c3dfc123d9271726c588963c7c01.tar.zst VIATRA-Generator-c1f185fd8fc2c3dfc123d9271726c588963c7c01.zip |
Objective POC implementation
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/CostEntryImpl.java')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/CostEntryImpl.java | 270 |
1 files changed, 270 insertions, 0 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/CostEntryImpl.java b/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/CostEntryImpl.java new file mode 100644 index 00000000..892df6f5 --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src-gen/hu/bme/mit/inf/dslreasoner/application/applicationConfiguration/impl/CostEntryImpl.java | |||
@@ -0,0 +1,270 @@ | |||
1 | /** | ||
2 | * generated by Xtext 2.16.0 | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl; | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage; | ||
7 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.CostEntry; | ||
8 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternElement; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.emf.ecore.InternalEObject; | ||
15 | |||
16 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
17 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
18 | |||
19 | /** | ||
20 | * <!-- begin-user-doc --> | ||
21 | * An implementation of the model object '<em><b>Cost Entry</b></em>'. | ||
22 | * <!-- end-user-doc --> | ||
23 | * <p> | ||
24 | * The following features are implemented: | ||
25 | * </p> | ||
26 | * <ul> | ||
27 | * <li>{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.CostEntryImpl#getPatternElement <em>Pattern Element</em>}</li> | ||
28 | * <li>{@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.CostEntryImpl#getWeight <em>Weight</em>}</li> | ||
29 | * </ul> | ||
30 | * | ||
31 | * @generated | ||
32 | */ | ||
33 | public class CostEntryImpl extends MinimalEObjectImpl.Container implements CostEntry | ||
34 | { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getPatternElement() <em>Pattern Element</em>}' containment reference. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getPatternElement() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected PatternElement patternElement; | ||
44 | |||
45 | /** | ||
46 | * The default value of the '{@link #getWeight() <em>Weight</em>}' attribute. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getWeight() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected static final int WEIGHT_EDEFAULT = 0; | ||
54 | |||
55 | /** | ||
56 | * The cached value of the '{@link #getWeight() <em>Weight</em>}' attribute. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #getWeight() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected int weight = WEIGHT_EDEFAULT; | ||
64 | |||
65 | /** | ||
66 | * <!-- begin-user-doc --> | ||
67 | * <!-- end-user-doc --> | ||
68 | * @generated | ||
69 | */ | ||
70 | protected CostEntryImpl() | ||
71 | { | ||
72 | super(); | ||
73 | } | ||
74 | |||
75 | /** | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @generated | ||
79 | */ | ||
80 | @Override | ||
81 | protected EClass eStaticClass() | ||
82 | { | ||
83 | return ApplicationConfigurationPackage.Literals.COST_ENTRY; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @generated | ||
90 | */ | ||
91 | @Override | ||
92 | public PatternElement getPatternElement() | ||
93 | { | ||
94 | return patternElement; | ||
95 | } | ||
96 | |||
97 | /** | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | */ | ||
102 | public NotificationChain basicSetPatternElement(PatternElement newPatternElement, NotificationChain msgs) | ||
103 | { | ||
104 | PatternElement oldPatternElement = patternElement; | ||
105 | patternElement = newPatternElement; | ||
106 | if (eNotificationRequired()) | ||
107 | { | ||
108 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT, oldPatternElement, newPatternElement); | ||
109 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
110 | } | ||
111 | return msgs; | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public void setPatternElement(PatternElement newPatternElement) | ||
121 | { | ||
122 | if (newPatternElement != patternElement) | ||
123 | { | ||
124 | NotificationChain msgs = null; | ||
125 | if (patternElement != null) | ||
126 | msgs = ((InternalEObject)patternElement).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT, null, msgs); | ||
127 | if (newPatternElement != null) | ||
128 | msgs = ((InternalEObject)newPatternElement).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT, null, msgs); | ||
129 | msgs = basicSetPatternElement(newPatternElement, msgs); | ||
130 | if (msgs != null) msgs.dispatch(); | ||
131 | } | ||
132 | else if (eNotificationRequired()) | ||
133 | eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT, newPatternElement, newPatternElement)); | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | @Override | ||
142 | public int getWeight() | ||
143 | { | ||
144 | return weight; | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public void setWeight(int newWeight) | ||
154 | { | ||
155 | int oldWeight = weight; | ||
156 | weight = newWeight; | ||
157 | if (eNotificationRequired()) | ||
158 | eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.COST_ENTRY__WEIGHT, oldWeight, weight)); | ||
159 | } | ||
160 | |||
161 | /** | ||
162 | * <!-- begin-user-doc --> | ||
163 | * <!-- end-user-doc --> | ||
164 | * @generated | ||
165 | */ | ||
166 | @Override | ||
167 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) | ||
168 | { | ||
169 | switch (featureID) | ||
170 | { | ||
171 | case ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT: | ||
172 | return basicSetPatternElement(null, msgs); | ||
173 | } | ||
174 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
175 | } | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | @Override | ||
183 | public Object eGet(int featureID, boolean resolve, boolean coreType) | ||
184 | { | ||
185 | switch (featureID) | ||
186 | { | ||
187 | case ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT: | ||
188 | return getPatternElement(); | ||
189 | case ApplicationConfigurationPackage.COST_ENTRY__WEIGHT: | ||
190 | return getWeight(); | ||
191 | } | ||
192 | return super.eGet(featureID, resolve, coreType); | ||
193 | } | ||
194 | |||
195 | /** | ||
196 | * <!-- begin-user-doc --> | ||
197 | * <!-- end-user-doc --> | ||
198 | * @generated | ||
199 | */ | ||
200 | @Override | ||
201 | public void eSet(int featureID, Object newValue) | ||
202 | { | ||
203 | switch (featureID) | ||
204 | { | ||
205 | case ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT: | ||
206 | setPatternElement((PatternElement)newValue); | ||
207 | return; | ||
208 | case ApplicationConfigurationPackage.COST_ENTRY__WEIGHT: | ||
209 | setWeight((Integer)newValue); | ||
210 | return; | ||
211 | } | ||
212 | super.eSet(featureID, newValue); | ||
213 | } | ||
214 | |||
215 | /** | ||
216 | * <!-- begin-user-doc --> | ||
217 | * <!-- end-user-doc --> | ||
218 | * @generated | ||
219 | */ | ||
220 | @Override | ||
221 | public void eUnset(int featureID) | ||
222 | { | ||
223 | switch (featureID) | ||
224 | { | ||
225 | case ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT: | ||
226 | setPatternElement((PatternElement)null); | ||
227 | return; | ||
228 | case ApplicationConfigurationPackage.COST_ENTRY__WEIGHT: | ||
229 | setWeight(WEIGHT_EDEFAULT); | ||
230 | return; | ||
231 | } | ||
232 | super.eUnset(featureID); | ||
233 | } | ||
234 | |||
235 | /** | ||
236 | * <!-- begin-user-doc --> | ||
237 | * <!-- end-user-doc --> | ||
238 | * @generated | ||
239 | */ | ||
240 | @Override | ||
241 | public boolean eIsSet(int featureID) | ||
242 | { | ||
243 | switch (featureID) | ||
244 | { | ||
245 | case ApplicationConfigurationPackage.COST_ENTRY__PATTERN_ELEMENT: | ||
246 | return patternElement != null; | ||
247 | case ApplicationConfigurationPackage.COST_ENTRY__WEIGHT: | ||
248 | return weight != WEIGHT_EDEFAULT; | ||
249 | } | ||
250 | return super.eIsSet(featureID); | ||
251 | } | ||
252 | |||
253 | /** | ||
254 | * <!-- begin-user-doc --> | ||
255 | * <!-- end-user-doc --> | ||
256 | * @generated | ||
257 | */ | ||
258 | @Override | ||
259 | public String toString() | ||
260 | { | ||
261 | if (eIsProxy()) return super.toString(); | ||
262 | |||
263 | StringBuilder result = new StringBuilder(super.toString()); | ||
264 | result.append(" (weight: "); | ||
265 | result.append(weight); | ||
266 | result.append(')'); | ||
267 | return result.toString(); | ||
268 | } | ||
269 | |||
270 | } //CostEntryImpl | ||