1 | /**
|
---|
2 | */
|
---|
3 | package de.ugoe.cs.cpdp.decentApp.models.decent.impl;
|
---|
4 |
|
---|
5 | import java.util.Collection;
|
---|
6 | import java.util.Date;
|
---|
7 |
|
---|
8 | import org.eclipse.emf.common.notify.Notification;
|
---|
9 | import org.eclipse.emf.common.notify.NotificationChain;
|
---|
10 | import org.eclipse.emf.common.util.EList;
|
---|
11 | import org.eclipse.emf.ecore.EClass;
|
---|
12 | import org.eclipse.emf.ecore.InternalEObject;
|
---|
13 | import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
---|
14 | import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
---|
15 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
|
---|
16 | import org.eclipse.emf.ecore.util.EcoreUtil;
|
---|
17 | import org.eclipse.emf.ecore.util.InternalEList;
|
---|
18 |
|
---|
19 | import de.ugoe.cs.cpdp.decentApp.models.decent.Activity;
|
---|
20 | import de.ugoe.cs.cpdp.decentApp.models.decent.Agent;
|
---|
21 | import de.ugoe.cs.cpdp.decentApp.models.decent.AgentState;
|
---|
22 | import de.ugoe.cs.cpdp.decentApp.models.decent.DECENTPackage;
|
---|
23 | import de.ugoe.cs.cpdp.decentApp.models.decent.Value;
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * <!-- begin-user-doc -->
|
---|
27 | * An implementation of the model object '<em><b>Agent State</b></em>'.
|
---|
28 | * <!-- end-user-doc -->
|
---|
29 | * <p>
|
---|
30 | * The following features are implemented:
|
---|
31 | * <ul>
|
---|
32 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.decent.impl.AgentStateImpl#getDate <em>Date</em>}</li>
|
---|
33 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.decent.impl.AgentStateImpl#getAgent <em>Agent</em>}</li>
|
---|
34 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.decent.impl.AgentStateImpl#getActivities <em>Activities</em>}</li>
|
---|
35 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.decent.impl.AgentStateImpl#getNext <em>Next</em>}</li>
|
---|
36 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.decent.impl.AgentStateImpl#getPrevious <em>Previous</em>}</li>
|
---|
37 | * <li>{@link de.ugoe.cs.cpdp.decentApp.models.decent.impl.AgentStateImpl#getValues <em>Values</em>}</li>
|
---|
38 | * </ul>
|
---|
39 | * </p>
|
---|
40 | *
|
---|
41 | * @generated
|
---|
42 | */
|
---|
43 | public class AgentStateImpl extends ElementImpl implements AgentState {
|
---|
44 | /**
|
---|
45 | * The default value of the '{@link #getDate() <em>Date</em>}' attribute.
|
---|
46 | * <!-- begin-user-doc -->
|
---|
47 | * <!-- end-user-doc -->
|
---|
48 | * @see #getDate()
|
---|
49 | * @generated
|
---|
50 | * @ordered
|
---|
51 | */
|
---|
52 | protected static final Date DATE_EDEFAULT = null;
|
---|
53 |
|
---|
54 | /**
|
---|
55 | * The cached value of the '{@link #getDate() <em>Date</em>}' attribute.
|
---|
56 | * <!-- begin-user-doc -->
|
---|
57 | * <!-- end-user-doc -->
|
---|
58 | * @see #getDate()
|
---|
59 | * @generated
|
---|
60 | * @ordered
|
---|
61 | */
|
---|
62 | protected Date date = DATE_EDEFAULT;
|
---|
63 |
|
---|
64 | /**
|
---|
65 | * The cached value of the '{@link #getActivities() <em>Activities</em>}' reference list.
|
---|
66 | * <!-- begin-user-doc -->
|
---|
67 | * <!-- end-user-doc -->
|
---|
68 | * @see #getActivities()
|
---|
69 | * @generated
|
---|
70 | * @ordered
|
---|
71 | */
|
---|
72 | protected EList<Activity> activities;
|
---|
73 |
|
---|
74 | /**
|
---|
75 | * The cached value of the '{@link #getNext() <em>Next</em>}' reference.
|
---|
76 | * <!-- begin-user-doc -->
|
---|
77 | * <!-- end-user-doc -->
|
---|
78 | * @see #getNext()
|
---|
79 | * @generated
|
---|
80 | * @ordered
|
---|
81 | */
|
---|
82 | protected AgentState next;
|
---|
83 |
|
---|
84 | /**
|
---|
85 | * The cached value of the '{@link #getPrevious() <em>Previous</em>}' reference.
|
---|
86 | * <!-- begin-user-doc -->
|
---|
87 | * <!-- end-user-doc -->
|
---|
88 | * @see #getPrevious()
|
---|
89 | * @generated
|
---|
90 | * @ordered
|
---|
91 | */
|
---|
92 | protected AgentState previous;
|
---|
93 |
|
---|
94 | /**
|
---|
95 | * The cached value of the '{@link #getValues() <em>Values</em>}' containment reference list.
|
---|
96 | * <!-- begin-user-doc -->
|
---|
97 | * <!-- end-user-doc -->
|
---|
98 | * @see #getValues()
|
---|
99 | * @generated
|
---|
100 | * @ordered
|
---|
101 | */
|
---|
102 | protected EList<Value> values;
|
---|
103 |
|
---|
104 | /**
|
---|
105 | * <!-- begin-user-doc -->
|
---|
106 | * <!-- end-user-doc -->
|
---|
107 | * @generated
|
---|
108 | */
|
---|
109 | protected AgentStateImpl() {
|
---|
110 | super();
|
---|
111 | }
|
---|
112 |
|
---|
113 | /**
|
---|
114 | * <!-- begin-user-doc -->
|
---|
115 | * <!-- end-user-doc -->
|
---|
116 | * @generated
|
---|
117 | */
|
---|
118 | @Override
|
---|
119 | protected EClass eStaticClass() {
|
---|
120 | return DECENTPackage.Literals.AGENT_STATE;
|
---|
121 | }
|
---|
122 |
|
---|
123 | /**
|
---|
124 | * <!-- begin-user-doc -->
|
---|
125 | * <!-- end-user-doc -->
|
---|
126 | * @generated
|
---|
127 | */
|
---|
128 | public Date getDate() {
|
---|
129 | return date;
|
---|
130 | }
|
---|
131 |
|
---|
132 | /**
|
---|
133 | * <!-- begin-user-doc -->
|
---|
134 | * <!-- end-user-doc -->
|
---|
135 | * @generated
|
---|
136 | */
|
---|
137 | public void setDate(Date newDate) {
|
---|
138 | Date oldDate = date;
|
---|
139 | date = newDate;
|
---|
140 | if (eNotificationRequired())
|
---|
141 | eNotify(new ENotificationImpl(this, Notification.SET, DECENTPackage.AGENT_STATE__DATE, oldDate, date));
|
---|
142 | }
|
---|
143 |
|
---|
144 | /**
|
---|
145 | * <!-- begin-user-doc -->
|
---|
146 | * <!-- end-user-doc -->
|
---|
147 | * @generated
|
---|
148 | */
|
---|
149 | public Agent getAgent() {
|
---|
150 | if (eContainerFeatureID() != DECENTPackage.AGENT_STATE__AGENT) return null;
|
---|
151 | return (Agent)eInternalContainer();
|
---|
152 | }
|
---|
153 |
|
---|
154 | /**
|
---|
155 | * <!-- begin-user-doc -->
|
---|
156 | * <!-- end-user-doc -->
|
---|
157 | * @generated
|
---|
158 | */
|
---|
159 | public NotificationChain basicSetAgent(Agent newAgent, NotificationChain msgs) {
|
---|
160 | msgs = eBasicSetContainer((InternalEObject)newAgent, DECENTPackage.AGENT_STATE__AGENT, msgs);
|
---|
161 | return msgs;
|
---|
162 | }
|
---|
163 |
|
---|
164 | /**
|
---|
165 | * <!-- begin-user-doc -->
|
---|
166 | * <!-- end-user-doc -->
|
---|
167 | * @generated
|
---|
168 | */
|
---|
169 | public void setAgent(Agent newAgent) {
|
---|
170 | if (newAgent != eInternalContainer() || (eContainerFeatureID() != DECENTPackage.AGENT_STATE__AGENT && newAgent != null)) {
|
---|
171 | if (EcoreUtil.isAncestor(this, newAgent))
|
---|
172 | throw new IllegalArgumentException("Recursive containment not allowed for " + toString());
|
---|
173 | NotificationChain msgs = null;
|
---|
174 | if (eInternalContainer() != null)
|
---|
175 | msgs = eBasicRemoveFromContainer(msgs);
|
---|
176 | if (newAgent != null)
|
---|
177 | msgs = ((InternalEObject)newAgent).eInverseAdd(this, DECENTPackage.AGENT__STATES, Agent.class, msgs);
|
---|
178 | msgs = basicSetAgent(newAgent, msgs);
|
---|
179 | if (msgs != null) msgs.dispatch();
|
---|
180 | }
|
---|
181 | else if (eNotificationRequired())
|
---|
182 | eNotify(new ENotificationImpl(this, Notification.SET, DECENTPackage.AGENT_STATE__AGENT, newAgent, newAgent));
|
---|
183 | }
|
---|
184 |
|
---|
185 | /**
|
---|
186 | * <!-- begin-user-doc -->
|
---|
187 | * <!-- end-user-doc -->
|
---|
188 | * @generated
|
---|
189 | */
|
---|
190 | public EList<Activity> getActivities() {
|
---|
191 | if (activities == null) {
|
---|
192 | activities = new EObjectWithInverseResolvingEList<Activity>(Activity.class, this, DECENTPackage.AGENT_STATE__ACTIVITIES, DECENTPackage.ACTIVITY__AGENT_STATE);
|
---|
193 | }
|
---|
194 | return activities;
|
---|
195 | }
|
---|
196 |
|
---|
197 | /**
|
---|
198 | * <!-- begin-user-doc -->
|
---|
199 | * <!-- end-user-doc -->
|
---|
200 | * @generated
|
---|
201 | */
|
---|
202 | public AgentState getNext() {
|
---|
203 | if (next != null && next.eIsProxy()) {
|
---|
204 | InternalEObject oldNext = (InternalEObject)next;
|
---|
205 | next = (AgentState)eResolveProxy(oldNext);
|
---|
206 | if (next != oldNext) {
|
---|
207 | if (eNotificationRequired())
|
---|
208 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, DECENTPackage.AGENT_STATE__NEXT, oldNext, next));
|
---|
209 | }
|
---|
210 | }
|
---|
211 | return next;
|
---|
212 | }
|
---|
213 |
|
---|
214 | /**
|
---|
215 | * <!-- begin-user-doc -->
|
---|
216 | * <!-- end-user-doc -->
|
---|
217 | * @generated
|
---|
218 | */
|
---|
219 | public AgentState basicGetNext() {
|
---|
220 | return next;
|
---|
221 | }
|
---|
222 |
|
---|
223 | /**
|
---|
224 | * <!-- begin-user-doc -->
|
---|
225 | * <!-- end-user-doc -->
|
---|
226 | * @generated
|
---|
227 | */
|
---|
228 | public NotificationChain basicSetNext(AgentState newNext, NotificationChain msgs) {
|
---|
229 | AgentState oldNext = next;
|
---|
230 | next = newNext;
|
---|
231 | if (eNotificationRequired()) {
|
---|
232 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DECENTPackage.AGENT_STATE__NEXT, oldNext, newNext);
|
---|
233 | if (msgs == null) msgs = notification; else msgs.add(notification);
|
---|
234 | }
|
---|
235 | return msgs;
|
---|
236 | }
|
---|
237 |
|
---|
238 | /**
|
---|
239 | * <!-- begin-user-doc -->
|
---|
240 | * <!-- end-user-doc -->
|
---|
241 | * @generated
|
---|
242 | */
|
---|
243 | public void setNext(AgentState newNext) {
|
---|
244 | if (newNext != next) {
|
---|
245 | NotificationChain msgs = null;
|
---|
246 | if (next != null)
|
---|
247 | msgs = ((InternalEObject)next).eInverseRemove(this, DECENTPackage.AGENT_STATE__PREVIOUS, AgentState.class, msgs);
|
---|
248 | if (newNext != null)
|
---|
249 | msgs = ((InternalEObject)newNext).eInverseAdd(this, DECENTPackage.AGENT_STATE__PREVIOUS, AgentState.class, msgs);
|
---|
250 | msgs = basicSetNext(newNext, msgs);
|
---|
251 | if (msgs != null) msgs.dispatch();
|
---|
252 | }
|
---|
253 | else if (eNotificationRequired())
|
---|
254 | eNotify(new ENotificationImpl(this, Notification.SET, DECENTPackage.AGENT_STATE__NEXT, newNext, newNext));
|
---|
255 | }
|
---|
256 |
|
---|
257 | /**
|
---|
258 | * <!-- begin-user-doc -->
|
---|
259 | * <!-- end-user-doc -->
|
---|
260 | * @generated
|
---|
261 | */
|
---|
262 | public AgentState getPrevious() {
|
---|
263 | if (previous != null && previous.eIsProxy()) {
|
---|
264 | InternalEObject oldPrevious = (InternalEObject)previous;
|
---|
265 | previous = (AgentState)eResolveProxy(oldPrevious);
|
---|
266 | if (previous != oldPrevious) {
|
---|
267 | if (eNotificationRequired())
|
---|
268 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, DECENTPackage.AGENT_STATE__PREVIOUS, oldPrevious, previous));
|
---|
269 | }
|
---|
270 | }
|
---|
271 | return previous;
|
---|
272 | }
|
---|
273 |
|
---|
274 | /**
|
---|
275 | * <!-- begin-user-doc -->
|
---|
276 | * <!-- end-user-doc -->
|
---|
277 | * @generated
|
---|
278 | */
|
---|
279 | public AgentState basicGetPrevious() {
|
---|
280 | return previous;
|
---|
281 | }
|
---|
282 |
|
---|
283 | /**
|
---|
284 | * <!-- begin-user-doc -->
|
---|
285 | * <!-- end-user-doc -->
|
---|
286 | * @generated
|
---|
287 | */
|
---|
288 | public NotificationChain basicSetPrevious(AgentState newPrevious, NotificationChain msgs) {
|
---|
289 | AgentState oldPrevious = previous;
|
---|
290 | previous = newPrevious;
|
---|
291 | if (eNotificationRequired()) {
|
---|
292 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DECENTPackage.AGENT_STATE__PREVIOUS, oldPrevious, newPrevious);
|
---|
293 | if (msgs == null) msgs = notification; else msgs.add(notification);
|
---|
294 | }
|
---|
295 | return msgs;
|
---|
296 | }
|
---|
297 |
|
---|
298 | /**
|
---|
299 | * <!-- begin-user-doc -->
|
---|
300 | * <!-- end-user-doc -->
|
---|
301 | * @generated
|
---|
302 | */
|
---|
303 | public void setPrevious(AgentState newPrevious) {
|
---|
304 | if (newPrevious != previous) {
|
---|
305 | NotificationChain msgs = null;
|
---|
306 | if (previous != null)
|
---|
307 | msgs = ((InternalEObject)previous).eInverseRemove(this, DECENTPackage.AGENT_STATE__NEXT, AgentState.class, msgs);
|
---|
308 | if (newPrevious != null)
|
---|
309 | msgs = ((InternalEObject)newPrevious).eInverseAdd(this, DECENTPackage.AGENT_STATE__NEXT, AgentState.class, msgs);
|
---|
310 | msgs = basicSetPrevious(newPrevious, msgs);
|
---|
311 | if (msgs != null) msgs.dispatch();
|
---|
312 | }
|
---|
313 | else if (eNotificationRequired())
|
---|
314 | eNotify(new ENotificationImpl(this, Notification.SET, DECENTPackage.AGENT_STATE__PREVIOUS, newPrevious, newPrevious));
|
---|
315 | }
|
---|
316 |
|
---|
317 | /**
|
---|
318 | * <!-- begin-user-doc -->
|
---|
319 | * <!-- end-user-doc -->
|
---|
320 | * @generated
|
---|
321 | */
|
---|
322 | public EList<Value> getValues() {
|
---|
323 | if (values == null) {
|
---|
324 | values = new EObjectContainmentEList<Value>(Value.class, this, DECENTPackage.AGENT_STATE__VALUES);
|
---|
325 | }
|
---|
326 | return values;
|
---|
327 | }
|
---|
328 |
|
---|
329 | /**
|
---|
330 | * <!-- begin-user-doc -->
|
---|
331 | * <!-- end-user-doc -->
|
---|
332 | * @generated
|
---|
333 | */
|
---|
334 | @SuppressWarnings("unchecked")
|
---|
335 | @Override
|
---|
336 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
---|
337 | switch (featureID) {
|
---|
338 | case DECENTPackage.AGENT_STATE__AGENT:
|
---|
339 | if (eInternalContainer() != null)
|
---|
340 | msgs = eBasicRemoveFromContainer(msgs);
|
---|
341 | return basicSetAgent((Agent)otherEnd, msgs);
|
---|
342 | case DECENTPackage.AGENT_STATE__ACTIVITIES:
|
---|
343 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getActivities()).basicAdd(otherEnd, msgs);
|
---|
344 | case DECENTPackage.AGENT_STATE__NEXT:
|
---|
345 | if (next != null)
|
---|
346 | msgs = ((InternalEObject)next).eInverseRemove(this, DECENTPackage.AGENT_STATE__PREVIOUS, AgentState.class, msgs);
|
---|
347 | return basicSetNext((AgentState)otherEnd, msgs);
|
---|
348 | case DECENTPackage.AGENT_STATE__PREVIOUS:
|
---|
349 | if (previous != null)
|
---|
350 | msgs = ((InternalEObject)previous).eInverseRemove(this, DECENTPackage.AGENT_STATE__NEXT, AgentState.class, msgs);
|
---|
351 | return basicSetPrevious((AgentState)otherEnd, msgs);
|
---|
352 | }
|
---|
353 | return super.eInverseAdd(otherEnd, featureID, msgs);
|
---|
354 | }
|
---|
355 |
|
---|
356 | /**
|
---|
357 | * <!-- begin-user-doc -->
|
---|
358 | * <!-- end-user-doc -->
|
---|
359 | * @generated
|
---|
360 | */
|
---|
361 | @Override
|
---|
362 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
|
---|
363 | switch (featureID) {
|
---|
364 | case DECENTPackage.AGENT_STATE__AGENT:
|
---|
365 | return basicSetAgent(null, msgs);
|
---|
366 | case DECENTPackage.AGENT_STATE__ACTIVITIES:
|
---|
367 | return ((InternalEList<?>)getActivities()).basicRemove(otherEnd, msgs);
|
---|
368 | case DECENTPackage.AGENT_STATE__NEXT:
|
---|
369 | return basicSetNext(null, msgs);
|
---|
370 | case DECENTPackage.AGENT_STATE__PREVIOUS:
|
---|
371 | return basicSetPrevious(null, msgs);
|
---|
372 | case DECENTPackage.AGENT_STATE__VALUES:
|
---|
373 | return ((InternalEList<?>)getValues()).basicRemove(otherEnd, msgs);
|
---|
374 | }
|
---|
375 | return super.eInverseRemove(otherEnd, featureID, msgs);
|
---|
376 | }
|
---|
377 |
|
---|
378 | /**
|
---|
379 | * <!-- begin-user-doc -->
|
---|
380 | * <!-- end-user-doc -->
|
---|
381 | * @generated
|
---|
382 | */
|
---|
383 | @Override
|
---|
384 | public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) {
|
---|
385 | switch (eContainerFeatureID()) {
|
---|
386 | case DECENTPackage.AGENT_STATE__AGENT:
|
---|
387 | return eInternalContainer().eInverseRemove(this, DECENTPackage.AGENT__STATES, Agent.class, msgs);
|
---|
388 | }
|
---|
389 | return super.eBasicRemoveFromContainerFeature(msgs);
|
---|
390 | }
|
---|
391 |
|
---|
392 | /**
|
---|
393 | * <!-- begin-user-doc -->
|
---|
394 | * <!-- end-user-doc -->
|
---|
395 | * @generated
|
---|
396 | */
|
---|
397 | @Override
|
---|
398 | public Object eGet(int featureID, boolean resolve, boolean coreType) {
|
---|
399 | switch (featureID) {
|
---|
400 | case DECENTPackage.AGENT_STATE__DATE:
|
---|
401 | return getDate();
|
---|
402 | case DECENTPackage.AGENT_STATE__AGENT:
|
---|
403 | return getAgent();
|
---|
404 | case DECENTPackage.AGENT_STATE__ACTIVITIES:
|
---|
405 | return getActivities();
|
---|
406 | case DECENTPackage.AGENT_STATE__NEXT:
|
---|
407 | if (resolve) return getNext();
|
---|
408 | return basicGetNext();
|
---|
409 | case DECENTPackage.AGENT_STATE__PREVIOUS:
|
---|
410 | if (resolve) return getPrevious();
|
---|
411 | return basicGetPrevious();
|
---|
412 | case DECENTPackage.AGENT_STATE__VALUES:
|
---|
413 | return getValues();
|
---|
414 | }
|
---|
415 | return super.eGet(featureID, resolve, coreType);
|
---|
416 | }
|
---|
417 |
|
---|
418 | /**
|
---|
419 | * <!-- begin-user-doc -->
|
---|
420 | * <!-- end-user-doc -->
|
---|
421 | * @generated
|
---|
422 | */
|
---|
423 | @SuppressWarnings("unchecked")
|
---|
424 | @Override
|
---|
425 | public void eSet(int featureID, Object newValue) {
|
---|
426 | switch (featureID) {
|
---|
427 | case DECENTPackage.AGENT_STATE__DATE:
|
---|
428 | setDate((Date)newValue);
|
---|
429 | return;
|
---|
430 | case DECENTPackage.AGENT_STATE__AGENT:
|
---|
431 | setAgent((Agent)newValue);
|
---|
432 | return;
|
---|
433 | case DECENTPackage.AGENT_STATE__ACTIVITIES:
|
---|
434 | getActivities().clear();
|
---|
435 | getActivities().addAll((Collection<? extends Activity>)newValue);
|
---|
436 | return;
|
---|
437 | case DECENTPackage.AGENT_STATE__NEXT:
|
---|
438 | setNext((AgentState)newValue);
|
---|
439 | return;
|
---|
440 | case DECENTPackage.AGENT_STATE__PREVIOUS:
|
---|
441 | setPrevious((AgentState)newValue);
|
---|
442 | return;
|
---|
443 | case DECENTPackage.AGENT_STATE__VALUES:
|
---|
444 | getValues().clear();
|
---|
445 | getValues().addAll((Collection<? extends Value>)newValue);
|
---|
446 | return;
|
---|
447 | }
|
---|
448 | super.eSet(featureID, newValue);
|
---|
449 | }
|
---|
450 |
|
---|
451 | /**
|
---|
452 | * <!-- begin-user-doc -->
|
---|
453 | * <!-- end-user-doc -->
|
---|
454 | * @generated
|
---|
455 | */
|
---|
456 | @Override
|
---|
457 | public void eUnset(int featureID) {
|
---|
458 | switch (featureID) {
|
---|
459 | case DECENTPackage.AGENT_STATE__DATE:
|
---|
460 | setDate(DATE_EDEFAULT);
|
---|
461 | return;
|
---|
462 | case DECENTPackage.AGENT_STATE__AGENT:
|
---|
463 | setAgent((Agent)null);
|
---|
464 | return;
|
---|
465 | case DECENTPackage.AGENT_STATE__ACTIVITIES:
|
---|
466 | getActivities().clear();
|
---|
467 | return;
|
---|
468 | case DECENTPackage.AGENT_STATE__NEXT:
|
---|
469 | setNext((AgentState)null);
|
---|
470 | return;
|
---|
471 | case DECENTPackage.AGENT_STATE__PREVIOUS:
|
---|
472 | setPrevious((AgentState)null);
|
---|
473 | return;
|
---|
474 | case DECENTPackage.AGENT_STATE__VALUES:
|
---|
475 | getValues().clear();
|
---|
476 | return;
|
---|
477 | }
|
---|
478 | super.eUnset(featureID);
|
---|
479 | }
|
---|
480 |
|
---|
481 | /**
|
---|
482 | * <!-- begin-user-doc -->
|
---|
483 | * <!-- end-user-doc -->
|
---|
484 | * @generated
|
---|
485 | */
|
---|
486 | @Override
|
---|
487 | public boolean eIsSet(int featureID) {
|
---|
488 | switch (featureID) {
|
---|
489 | case DECENTPackage.AGENT_STATE__DATE:
|
---|
490 | return DATE_EDEFAULT == null ? date != null : !DATE_EDEFAULT.equals(date);
|
---|
491 | case DECENTPackage.AGENT_STATE__AGENT:
|
---|
492 | return getAgent() != null;
|
---|
493 | case DECENTPackage.AGENT_STATE__ACTIVITIES:
|
---|
494 | return activities != null && !activities.isEmpty();
|
---|
495 | case DECENTPackage.AGENT_STATE__NEXT:
|
---|
496 | return next != null;
|
---|
497 | case DECENTPackage.AGENT_STATE__PREVIOUS:
|
---|
498 | return previous != null;
|
---|
499 | case DECENTPackage.AGENT_STATE__VALUES:
|
---|
500 | return values != null && !values.isEmpty();
|
---|
501 | }
|
---|
502 | return super.eIsSet(featureID);
|
---|
503 | }
|
---|
504 |
|
---|
505 | /**
|
---|
506 | * <!-- begin-user-doc -->
|
---|
507 | * <!-- end-user-doc -->
|
---|
508 | * @generated
|
---|
509 | */
|
---|
510 | @Override
|
---|
511 | public String toString() {
|
---|
512 | if (eIsProxy()) return super.toString();
|
---|
513 |
|
---|
514 | StringBuffer result = new StringBuffer(super.toString());
|
---|
515 | result.append(" (date: ");
|
---|
516 | result.append(date);
|
---|
517 | result.append(')');
|
---|
518 | return result.toString();
|
---|
519 | }
|
---|
520 |
|
---|
521 | } //AgentStateImpl
|
---|