| 1 | /** |
| 2 | * <copyright> |
| 3 | * </copyright> |
| 4 | * |
| 5 | * $Id$ |
| 6 | */ |
| 7 | package LqnCore.impl; |
| 8 | |
| 9 | import LqnCore.LqnCoreFactory; |
| 10 | import LqnCore.LqnCorePackage; |
| 11 | import LqnCore.OutputResultType; |
| 12 | import LqnCore.ProcessorType; |
| 13 | import LqnCore.SchedulingType; |
| 14 | import LqnCore.TaskType; |
| 15 | |
| 16 | import java.math.BigInteger; |
| 17 | |
| 18 | import java.util.Collection; |
| 19 | |
| 20 | import org.eclipse.emf.common.notify.Notification; |
| 21 | import org.eclipse.emf.common.notify.NotificationChain; |
| 22 | |
| 23 | import org.eclipse.emf.common.util.EList; |
| 24 | |
| 25 | import org.eclipse.emf.ecore.EClass; |
| 26 | import org.eclipse.emf.ecore.InternalEObject; |
| 27 | |
| 28 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 29 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
| 30 | |
| 31 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| 32 | import org.eclipse.emf.ecore.util.InternalEList; |
| 33 | |
| 34 | /** |
| 35 | * <!-- begin-user-doc --> |
| 36 | * An implementation of the model object '<em><b>Processor Type</b></em>'. |
| 37 | * <!-- end-user-doc --> |
| 38 | * <p> |
| 39 | * The following features are implemented: |
| 40 | * <ul> |
| 41 | * <li>{@link LqnCore.impl.ProcessorTypeImpl#getResultProcessor <em>Result Processor</em>}</li> |
| 42 | * <li>{@link LqnCore.impl.ProcessorTypeImpl#getTask <em>Task</em>}</li> |
| 43 | * <li>{@link LqnCore.impl.ProcessorTypeImpl#getMultiplicity <em>Multiplicity</em>}</li> |
| 44 | * <li>{@link LqnCore.impl.ProcessorTypeImpl#getName <em>Name</em>}</li> |
| 45 | * <li>{@link LqnCore.impl.ProcessorTypeImpl#getQuantum <em>Quantum</em>}</li> |
| 46 | * <li>{@link LqnCore.impl.ProcessorTypeImpl#getReplication <em>Replication</em>}</li> |
| 47 | * <li>{@link LqnCore.impl.ProcessorTypeImpl#getScheduling <em>Scheduling</em>}</li> |
| 48 | * <li>{@link LqnCore.impl.ProcessorTypeImpl#getSpeedFactor <em>Speed Factor</em>}</li> |
| 49 | * </ul> |
| 50 | * </p> |
| 51 | * |
| 52 | * @generated |
| 53 | */ |
| 54 | public class ProcessorTypeImpl extends EObjectImpl implements ProcessorType { |
| 55 | /** |
| 56 | * The cached value of the '{@link #getResultProcessor() <em>Result Processor</em>}' containment reference list. |
| 57 | * <!-- begin-user-doc --> |
| 58 | * <!-- end-user-doc --> |
| 59 | * @see #getResultProcessor() |
| 60 | * @generated |
| 61 | * @ordered |
| 62 | */ |
| 63 | protected EList<OutputResultType> resultProcessor; |
| 64 | |
| 65 | /** |
| 66 | * The cached value of the '{@link #getTask() <em>Task</em>}' containment reference list. |
| 67 | * <!-- begin-user-doc --> |
| 68 | * <!-- end-user-doc --> |
| 69 | * @see #getTask() |
| 70 | * @generated |
| 71 | * @ordered |
| 72 | */ |
| 73 | protected EList<TaskType> task; |
| 74 | |
| 75 | /** |
| 76 | * The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute. |
| 77 | * <!-- begin-user-doc --> |
| 78 | * <!-- end-user-doc --> |
| 79 | * @see #getMultiplicity() |
| 80 | * @generated |
| 81 | * @ordered |
| 82 | */ |
| 83 | protected static final BigInteger MULTIPLICITY_EDEFAULT = new BigInteger("1"); |
| 84 | |
| 85 | /** |
| 86 | * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute. |
| 87 | * <!-- begin-user-doc --> |
| 88 | * <!-- end-user-doc --> |
| 89 | * @see #getMultiplicity() |
| 90 | * @generated |
| 91 | * @ordered |
| 92 | */ |
| 93 | protected BigInteger multiplicity = MULTIPLICITY_EDEFAULT; |
| 94 | |
| 95 | /** |
| 96 | * This is true if the Multiplicity attribute has been set. |
| 97 | * <!-- begin-user-doc --> |
| 98 | * <!-- end-user-doc --> |
| 99 | * @generated |
| 100 | * @ordered |
| 101 | */ |
| 102 | protected boolean multiplicityESet; |
| 103 | |
| 104 | /** |
| 105 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. |
| 106 | * <!-- begin-user-doc --> |
| 107 | * <!-- end-user-doc --> |
| 108 | * @see #getName() |
| 109 | * @generated |
| 110 | * @ordered |
| 111 | */ |
| 112 | protected static final String NAME_EDEFAULT = null; |
| 113 | |
| 114 | /** |
| 115 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. |
| 116 | * <!-- begin-user-doc --> |
| 117 | * <!-- end-user-doc --> |
| 118 | * @see #getName() |
| 119 | * @generated |
| 120 | * @ordered |
| 121 | */ |
| 122 | protected String name = NAME_EDEFAULT; |
| 123 | |
| 124 | /** |
| 125 | * The default value of the '{@link #getQuantum() <em>Quantum</em>}' attribute. |
| 126 | * <!-- begin-user-doc --> |
| 127 | * <!-- end-user-doc --> |
| 128 | * @see #getQuantum() |
| 129 | * @generated |
| 130 | * @ordered |
| 131 | */ |
| 132 | protected static final Object QUANTUM_EDEFAULT = LqnCoreFactory.eINSTANCE.createFromString(LqnCorePackage.eINSTANCE.getSrvnFloat(), "0"); |
| 133 | |
| 134 | /** |
| 135 | * The cached value of the '{@link #getQuantum() <em>Quantum</em>}' attribute. |
| 136 | * <!-- begin-user-doc --> |
| 137 | * <!-- end-user-doc --> |
| 138 | * @see #getQuantum() |
| 139 | * @generated |
| 140 | * @ordered |
| 141 | */ |
| 142 | protected Object quantum = QUANTUM_EDEFAULT; |
| 143 | |
| 144 | /** |
| 145 | * This is true if the Quantum attribute has been set. |
| 146 | * <!-- begin-user-doc --> |
| 147 | * <!-- end-user-doc --> |
| 148 | * @generated |
| 149 | * @ordered |
| 150 | */ |
| 151 | protected boolean quantumESet; |
| 152 | |
| 153 | /** |
| 154 | * The default value of the '{@link #getReplication() <em>Replication</em>}' attribute. |
| 155 | * <!-- begin-user-doc --> |
| 156 | * <!-- end-user-doc --> |
| 157 | * @see #getReplication() |
| 158 | * @generated |
| 159 | * @ordered |
| 160 | */ |
| 161 | protected static final BigInteger REPLICATION_EDEFAULT = new BigInteger("1"); |
| 162 | |
| 163 | /** |
| 164 | * The cached value of the '{@link #getReplication() <em>Replication</em>}' attribute. |
| 165 | * <!-- begin-user-doc --> |
| 166 | * <!-- end-user-doc --> |
| 167 | * @see #getReplication() |
| 168 | * @generated |
| 169 | * @ordered |
| 170 | */ |
| 171 | protected BigInteger replication = REPLICATION_EDEFAULT; |
| 172 | |
| 173 | /** |
| 174 | * This is true if the Replication attribute has been set. |
| 175 | * <!-- begin-user-doc --> |
| 176 | * <!-- end-user-doc --> |
| 177 | * @generated |
| 178 | * @ordered |
| 179 | */ |
| 180 | protected boolean replicationESet; |
| 181 | |
| 182 | /** |
| 183 | * The default value of the '{@link #getScheduling() <em>Scheduling</em>}' attribute. |
| 184 | * <!-- begin-user-doc --> |
| 185 | * <!-- end-user-doc --> |
| 186 | * @see #getScheduling() |
| 187 | * @generated |
| 188 | * @ordered |
| 189 | */ |
| 190 | protected static final SchedulingType SCHEDULING_EDEFAULT = SchedulingType.FCFS; |
| 191 | |
| 192 | /** |
| 193 | * The cached value of the '{@link #getScheduling() <em>Scheduling</em>}' attribute. |
| 194 | * <!-- begin-user-doc --> |
| 195 | * <!-- end-user-doc --> |
| 196 | * @see #getScheduling() |
| 197 | * @generated |
| 198 | * @ordered |
| 199 | */ |
| 200 | protected SchedulingType scheduling = SCHEDULING_EDEFAULT; |
| 201 | |
| 202 | /** |
| 203 | * This is true if the Scheduling attribute has been set. |
| 204 | * <!-- begin-user-doc --> |
| 205 | * <!-- end-user-doc --> |
| 206 | * @generated |
| 207 | * @ordered |
| 208 | */ |
| 209 | protected boolean schedulingESet; |
| 210 | |
| 211 | /** |
| 212 | * The default value of the '{@link #getSpeedFactor() <em>Speed Factor</em>}' attribute. |
| 213 | * <!-- begin-user-doc --> |
| 214 | * <!-- end-user-doc --> |
| 215 | * @see #getSpeedFactor() |
| 216 | * @generated |
| 217 | * @ordered |
| 218 | */ |
| 219 | protected static final Object SPEED_FACTOR_EDEFAULT = LqnCoreFactory.eINSTANCE.createFromString(LqnCorePackage.eINSTANCE.getSrvnFloat(), "1"); |
| 220 | |
| 221 | /** |
| 222 | * The cached value of the '{@link #getSpeedFactor() <em>Speed Factor</em>}' attribute. |
| 223 | * <!-- begin-user-doc --> |
| 224 | * <!-- end-user-doc --> |
| 225 | * @see #getSpeedFactor() |
| 226 | * @generated |
| 227 | * @ordered |
| 228 | */ |
| 229 | protected Object speedFactor = SPEED_FACTOR_EDEFAULT; |
| 230 | |
| 231 | /** |
| 232 | * This is true if the Speed Factor attribute has been set. |
| 233 | * <!-- begin-user-doc --> |
| 234 | * <!-- end-user-doc --> |
| 235 | * @generated |
| 236 | * @ordered |
| 237 | */ |
| 238 | protected boolean speedFactorESet; |
| 239 | |
| 240 | /** |
| 241 | * <!-- begin-user-doc --> |
| 242 | * <!-- end-user-doc --> |
| 243 | * @generated |
| 244 | */ |
| 245 | protected ProcessorTypeImpl() { |
| 246 | super(); |
| 247 | } |
| 248 | |
| 249 | /** |
| 250 | * <!-- begin-user-doc --> |
| 251 | * <!-- end-user-doc --> |
| 252 | * @generated |
| 253 | */ |
| 254 | @Override |
| 255 | protected EClass eStaticClass() { |
| 256 | return LqnCorePackage.Literals.PROCESSOR_TYPE; |
| 257 | } |
| 258 | |
| 259 | /** |
| 260 | * <!-- begin-user-doc --> |
| 261 | * <!-- end-user-doc --> |
| 262 | * @generated |
| 263 | */ |
| 264 | public EList<OutputResultType> getResultProcessor() { |
| 265 | if (resultProcessor == null) { |
| 266 | resultProcessor = new EObjectContainmentEList<OutputResultType>(OutputResultType.class, this, LqnCorePackage.PROCESSOR_TYPE__RESULT_PROCESSOR); |
| 267 | } |
| 268 | return resultProcessor; |
| 269 | } |
| 270 | |
| 271 | /** |
| 272 | * <!-- begin-user-doc --> |
| 273 | * <!-- end-user-doc --> |
| 274 | * @generated |
| 275 | */ |
| 276 | public EList<TaskType> getTask() { |
| 277 | if (task == null) { |
| 278 | task = new EObjectContainmentEList<TaskType>(TaskType.class, this, LqnCorePackage.PROCESSOR_TYPE__TASK); |
| 279 | } |
| 280 | return task; |
| 281 | } |
| 282 | |
| 283 | /** |
| 284 | * <!-- begin-user-doc --> |
| 285 | * <!-- end-user-doc --> |
| 286 | * @generated |
| 287 | */ |
| 288 | public BigInteger getMultiplicity() { |
| 289 | return multiplicity; |
| 290 | } |
| 291 | |
| 292 | /** |
| 293 | * <!-- begin-user-doc --> |
| 294 | * <!-- end-user-doc --> |
| 295 | * @generated |
| 296 | */ |
| 297 | public void setMultiplicity(BigInteger newMultiplicity) { |
| 298 | BigInteger oldMultiplicity = multiplicity; |
| 299 | multiplicity = newMultiplicity; |
| 300 | boolean oldMultiplicityESet = multiplicityESet; |
| 301 | multiplicityESet = true; |
| 302 | if (eNotificationRequired()) |
| 303 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.PROCESSOR_TYPE__MULTIPLICITY, oldMultiplicity, multiplicity, !oldMultiplicityESet)); |
| 304 | } |
| 305 | |
| 306 | /** |
| 307 | * <!-- begin-user-doc --> |
| 308 | * <!-- end-user-doc --> |
| 309 | * @generated |
| 310 | */ |
| 311 | public void unsetMultiplicity() { |
| 312 | BigInteger oldMultiplicity = multiplicity; |
| 313 | boolean oldMultiplicityESet = multiplicityESet; |
| 314 | multiplicity = MULTIPLICITY_EDEFAULT; |
| 315 | multiplicityESet = false; |
| 316 | if (eNotificationRequired()) |
| 317 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.PROCESSOR_TYPE__MULTIPLICITY, oldMultiplicity, MULTIPLICITY_EDEFAULT, oldMultiplicityESet)); |
| 318 | } |
| 319 | |
| 320 | /** |
| 321 | * <!-- begin-user-doc --> |
| 322 | * <!-- end-user-doc --> |
| 323 | * @generated |
| 324 | */ |
| 325 | public boolean isSetMultiplicity() { |
| 326 | return multiplicityESet; |
| 327 | } |
| 328 | |
| 329 | /** |
| 330 | * <!-- begin-user-doc --> |
| 331 | * <!-- end-user-doc --> |
| 332 | * @generated |
| 333 | */ |
| 334 | public String getName() { |
| 335 | return name; |
| 336 | } |
| 337 | |
| 338 | /** |
| 339 | * <!-- begin-user-doc --> |
| 340 | * <!-- end-user-doc --> |
| 341 | * @generated |
| 342 | */ |
| 343 | public void setName(String newName) { |
| 344 | String oldName = name; |
| 345 | name = newName; |
| 346 | if (eNotificationRequired()) |
| 347 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.PROCESSOR_TYPE__NAME, oldName, name)); |
| 348 | } |
| 349 | |
| 350 | /** |
| 351 | * <!-- begin-user-doc --> |
| 352 | * <!-- end-user-doc --> |
| 353 | * @generated |
| 354 | */ |
| 355 | public Object getQuantum() { |
| 356 | return quantum; |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * <!-- begin-user-doc --> |
| 361 | * <!-- end-user-doc --> |
| 362 | * @generated |
| 363 | */ |
| 364 | public void setQuantum(Object newQuantum) { |
| 365 | Object oldQuantum = quantum; |
| 366 | quantum = newQuantum; |
| 367 | boolean oldQuantumESet = quantumESet; |
| 368 | quantumESet = true; |
| 369 | if (eNotificationRequired()) |
| 370 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.PROCESSOR_TYPE__QUANTUM, oldQuantum, quantum, !oldQuantumESet)); |
| 371 | } |
| 372 | |
| 373 | /** |
| 374 | * <!-- begin-user-doc --> |
| 375 | * <!-- end-user-doc --> |
| 376 | * @generated |
| 377 | */ |
| 378 | public void unsetQuantum() { |
| 379 | Object oldQuantum = quantum; |
| 380 | boolean oldQuantumESet = quantumESet; |
| 381 | quantum = QUANTUM_EDEFAULT; |
| 382 | quantumESet = false; |
| 383 | if (eNotificationRequired()) |
| 384 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.PROCESSOR_TYPE__QUANTUM, oldQuantum, QUANTUM_EDEFAULT, oldQuantumESet)); |
| 385 | } |
| 386 | |
| 387 | /** |
| 388 | * <!-- begin-user-doc --> |
| 389 | * <!-- end-user-doc --> |
| 390 | * @generated |
| 391 | */ |
| 392 | public boolean isSetQuantum() { |
| 393 | return quantumESet; |
| 394 | } |
| 395 | |
| 396 | /** |
| 397 | * <!-- begin-user-doc --> |
| 398 | * <!-- end-user-doc --> |
| 399 | * @generated |
| 400 | */ |
| 401 | public BigInteger getReplication() { |
| 402 | return replication; |
| 403 | } |
| 404 | |
| 405 | /** |
| 406 | * <!-- begin-user-doc --> |
| 407 | * <!-- end-user-doc --> |
| 408 | * @generated |
| 409 | */ |
| 410 | public void setReplication(BigInteger newReplication) { |
| 411 | BigInteger oldReplication = replication; |
| 412 | replication = newReplication; |
| 413 | boolean oldReplicationESet = replicationESet; |
| 414 | replicationESet = true; |
| 415 | if (eNotificationRequired()) |
| 416 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.PROCESSOR_TYPE__REPLICATION, oldReplication, replication, !oldReplicationESet)); |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * <!-- begin-user-doc --> |
| 421 | * <!-- end-user-doc --> |
| 422 | * @generated |
| 423 | */ |
| 424 | public void unsetReplication() { |
| 425 | BigInteger oldReplication = replication; |
| 426 | boolean oldReplicationESet = replicationESet; |
| 427 | replication = REPLICATION_EDEFAULT; |
| 428 | replicationESet = false; |
| 429 | if (eNotificationRequired()) |
| 430 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.PROCESSOR_TYPE__REPLICATION, oldReplication, REPLICATION_EDEFAULT, oldReplicationESet)); |
| 431 | } |
| 432 | |
| 433 | /** |
| 434 | * <!-- begin-user-doc --> |
| 435 | * <!-- end-user-doc --> |
| 436 | * @generated |
| 437 | */ |
| 438 | public boolean isSetReplication() { |
| 439 | return replicationESet; |
| 440 | } |
| 441 | |
| 442 | /** |
| 443 | * <!-- begin-user-doc --> |
| 444 | * <!-- end-user-doc --> |
| 445 | * @generated |
| 446 | */ |
| 447 | public SchedulingType getScheduling() { |
| 448 | return scheduling; |
| 449 | } |
| 450 | |
| 451 | /** |
| 452 | * <!-- begin-user-doc --> |
| 453 | * <!-- end-user-doc --> |
| 454 | * @generated |
| 455 | */ |
| 456 | public void setScheduling(SchedulingType newScheduling) { |
| 457 | SchedulingType oldScheduling = scheduling; |
| 458 | scheduling = newScheduling == null ? SCHEDULING_EDEFAULT : newScheduling; |
| 459 | boolean oldSchedulingESet = schedulingESet; |
| 460 | schedulingESet = true; |
| 461 | if (eNotificationRequired()) |
| 462 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.PROCESSOR_TYPE__SCHEDULING, oldScheduling, scheduling, !oldSchedulingESet)); |
| 463 | } |
| 464 | |
| 465 | /** |
| 466 | * <!-- begin-user-doc --> |
| 467 | * <!-- end-user-doc --> |
| 468 | * @generated |
| 469 | */ |
| 470 | public void unsetScheduling() { |
| 471 | SchedulingType oldScheduling = scheduling; |
| 472 | boolean oldSchedulingESet = schedulingESet; |
| 473 | scheduling = SCHEDULING_EDEFAULT; |
| 474 | schedulingESet = false; |
| 475 | if (eNotificationRequired()) |
| 476 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.PROCESSOR_TYPE__SCHEDULING, oldScheduling, SCHEDULING_EDEFAULT, oldSchedulingESet)); |
| 477 | } |
| 478 | |
| 479 | /** |
| 480 | * <!-- begin-user-doc --> |
| 481 | * <!-- end-user-doc --> |
| 482 | * @generated |
| 483 | */ |
| 484 | public boolean isSetScheduling() { |
| 485 | return schedulingESet; |
| 486 | } |
| 487 | |
| 488 | /** |
| 489 | * <!-- begin-user-doc --> |
| 490 | * <!-- end-user-doc --> |
| 491 | * @generated |
| 492 | */ |
| 493 | public Object getSpeedFactor() { |
| 494 | return speedFactor; |
| 495 | } |
| 496 | |
| 497 | /** |
| 498 | * <!-- begin-user-doc --> |
| 499 | * <!-- end-user-doc --> |
| 500 | * @generated |
| 501 | */ |
| 502 | public void setSpeedFactor(Object newSpeedFactor) { |
| 503 | Object oldSpeedFactor = speedFactor; |
| 504 | speedFactor = newSpeedFactor; |
| 505 | boolean oldSpeedFactorESet = speedFactorESet; |
| 506 | speedFactorESet = true; |
| 507 | if (eNotificationRequired()) |
| 508 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.PROCESSOR_TYPE__SPEED_FACTOR, oldSpeedFactor, speedFactor, !oldSpeedFactorESet)); |
| 509 | } |
| 510 | |
| 511 | /** |
| 512 | * <!-- begin-user-doc --> |
| 513 | * <!-- end-user-doc --> |
| 514 | * @generated |
| 515 | */ |
| 516 | public void unsetSpeedFactor() { |
| 517 | Object oldSpeedFactor = speedFactor; |
| 518 | boolean oldSpeedFactorESet = speedFactorESet; |
| 519 | speedFactor = SPEED_FACTOR_EDEFAULT; |
| 520 | speedFactorESet = false; |
| 521 | if (eNotificationRequired()) |
| 522 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.PROCESSOR_TYPE__SPEED_FACTOR, oldSpeedFactor, SPEED_FACTOR_EDEFAULT, oldSpeedFactorESet)); |
| 523 | } |
| 524 | |
| 525 | /** |
| 526 | * <!-- begin-user-doc --> |
| 527 | * <!-- end-user-doc --> |
| 528 | * @generated |
| 529 | */ |
| 530 | public boolean isSetSpeedFactor() { |
| 531 | return speedFactorESet; |
| 532 | } |
| 533 | |
| 534 | /** |
| 535 | * <!-- begin-user-doc --> |
| 536 | * <!-- end-user-doc --> |
| 537 | * @generated |
| 538 | */ |
| 539 | @Override |
| 540 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 541 | switch (featureID) { |
| 542 | case LqnCorePackage.PROCESSOR_TYPE__RESULT_PROCESSOR: |
| 543 | return ((InternalEList<?>)getResultProcessor()).basicRemove(otherEnd, msgs); |
| 544 | case LqnCorePackage.PROCESSOR_TYPE__TASK: |
| 545 | return ((InternalEList<?>)getTask()).basicRemove(otherEnd, msgs); |
| 546 | } |
| 547 | return super.eInverseRemove(otherEnd, featureID, msgs); |
| 548 | } |
| 549 | |
| 550 | /** |
| 551 | * <!-- begin-user-doc --> |
| 552 | * <!-- end-user-doc --> |
| 553 | * @generated |
| 554 | */ |
| 555 | @Override |
| 556 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 557 | switch (featureID) { |
| 558 | case LqnCorePackage.PROCESSOR_TYPE__RESULT_PROCESSOR: |
| 559 | return getResultProcessor(); |
| 560 | case LqnCorePackage.PROCESSOR_TYPE__TASK: |
| 561 | return getTask(); |
| 562 | case LqnCorePackage.PROCESSOR_TYPE__MULTIPLICITY: |
| 563 | return getMultiplicity(); |
| 564 | case LqnCorePackage.PROCESSOR_TYPE__NAME: |
| 565 | return getName(); |
| 566 | case LqnCorePackage.PROCESSOR_TYPE__QUANTUM: |
| 567 | return getQuantum(); |
| 568 | case LqnCorePackage.PROCESSOR_TYPE__REPLICATION: |
| 569 | return getReplication(); |
| 570 | case LqnCorePackage.PROCESSOR_TYPE__SCHEDULING: |
| 571 | return getScheduling(); |
| 572 | case LqnCorePackage.PROCESSOR_TYPE__SPEED_FACTOR: |
| 573 | return getSpeedFactor(); |
| 574 | } |
| 575 | return super.eGet(featureID, resolve, coreType); |
| 576 | } |
| 577 | |
| 578 | /** |
| 579 | * <!-- begin-user-doc --> |
| 580 | * <!-- end-user-doc --> |
| 581 | * @generated |
| 582 | */ |
| 583 | @SuppressWarnings("unchecked") |
| 584 | @Override |
| 585 | public void eSet(int featureID, Object newValue) { |
| 586 | switch (featureID) { |
| 587 | case LqnCorePackage.PROCESSOR_TYPE__RESULT_PROCESSOR: |
| 588 | getResultProcessor().clear(); |
| 589 | getResultProcessor().addAll((Collection<? extends OutputResultType>)newValue); |
| 590 | return; |
| 591 | case LqnCorePackage.PROCESSOR_TYPE__TASK: |
| 592 | getTask().clear(); |
| 593 | getTask().addAll((Collection<? extends TaskType>)newValue); |
| 594 | return; |
| 595 | case LqnCorePackage.PROCESSOR_TYPE__MULTIPLICITY: |
| 596 | setMultiplicity((BigInteger)newValue); |
| 597 | return; |
| 598 | case LqnCorePackage.PROCESSOR_TYPE__NAME: |
| 599 | setName((String)newValue); |
| 600 | return; |
| 601 | case LqnCorePackage.PROCESSOR_TYPE__QUANTUM: |
| 602 | setQuantum(newValue); |
| 603 | return; |
| 604 | case LqnCorePackage.PROCESSOR_TYPE__REPLICATION: |
| 605 | setReplication((BigInteger)newValue); |
| 606 | return; |
| 607 | case LqnCorePackage.PROCESSOR_TYPE__SCHEDULING: |
| 608 | setScheduling((SchedulingType)newValue); |
| 609 | return; |
| 610 | case LqnCorePackage.PROCESSOR_TYPE__SPEED_FACTOR: |
| 611 | setSpeedFactor(newValue); |
| 612 | return; |
| 613 | } |
| 614 | super.eSet(featureID, newValue); |
| 615 | } |
| 616 | |
| 617 | /** |
| 618 | * <!-- begin-user-doc --> |
| 619 | * <!-- end-user-doc --> |
| 620 | * @generated |
| 621 | */ |
| 622 | @Override |
| 623 | public void eUnset(int featureID) { |
| 624 | switch (featureID) { |
| 625 | case LqnCorePackage.PROCESSOR_TYPE__RESULT_PROCESSOR: |
| 626 | getResultProcessor().clear(); |
| 627 | return; |
| 628 | case LqnCorePackage.PROCESSOR_TYPE__TASK: |
| 629 | getTask().clear(); |
| 630 | return; |
| 631 | case LqnCorePackage.PROCESSOR_TYPE__MULTIPLICITY: |
| 632 | unsetMultiplicity(); |
| 633 | return; |
| 634 | case LqnCorePackage.PROCESSOR_TYPE__NAME: |
| 635 | setName(NAME_EDEFAULT); |
| 636 | return; |
| 637 | case LqnCorePackage.PROCESSOR_TYPE__QUANTUM: |
| 638 | unsetQuantum(); |
| 639 | return; |
| 640 | case LqnCorePackage.PROCESSOR_TYPE__REPLICATION: |
| 641 | unsetReplication(); |
| 642 | return; |
| 643 | case LqnCorePackage.PROCESSOR_TYPE__SCHEDULING: |
| 644 | unsetScheduling(); |
| 645 | return; |
| 646 | case LqnCorePackage.PROCESSOR_TYPE__SPEED_FACTOR: |
| 647 | unsetSpeedFactor(); |
| 648 | return; |
| 649 | } |
| 650 | super.eUnset(featureID); |
| 651 | } |
| 652 | |
| 653 | /** |
| 654 | * <!-- begin-user-doc --> |
| 655 | * <!-- end-user-doc --> |
| 656 | * @generated |
| 657 | */ |
| 658 | @Override |
| 659 | public boolean eIsSet(int featureID) { |
| 660 | switch (featureID) { |
| 661 | case LqnCorePackage.PROCESSOR_TYPE__RESULT_PROCESSOR: |
| 662 | return resultProcessor != null && !resultProcessor.isEmpty(); |
| 663 | case LqnCorePackage.PROCESSOR_TYPE__TASK: |
| 664 | return task != null && !task.isEmpty(); |
| 665 | case LqnCorePackage.PROCESSOR_TYPE__MULTIPLICITY: |
| 666 | return isSetMultiplicity(); |
| 667 | case LqnCorePackage.PROCESSOR_TYPE__NAME: |
| 668 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); |
| 669 | case LqnCorePackage.PROCESSOR_TYPE__QUANTUM: |
| 670 | return isSetQuantum(); |
| 671 | case LqnCorePackage.PROCESSOR_TYPE__REPLICATION: |
| 672 | return isSetReplication(); |
| 673 | case LqnCorePackage.PROCESSOR_TYPE__SCHEDULING: |
| 674 | return isSetScheduling(); |
| 675 | case LqnCorePackage.PROCESSOR_TYPE__SPEED_FACTOR: |
| 676 | return isSetSpeedFactor(); |
| 677 | } |
| 678 | return super.eIsSet(featureID); |
| 679 | } |
| 680 | |
| 681 | /** |
| 682 | * <!-- begin-user-doc --> |
| 683 | * <!-- end-user-doc --> |
| 684 | * @generated |
| 685 | */ |
| 686 | @Override |
| 687 | public String toString() { |
| 688 | if (eIsProxy()) return super.toString(); |
| 689 | |
| 690 | StringBuffer result = new StringBuffer(super.toString()); |
| 691 | result.append(" (multiplicity: "); |
| 692 | if (multiplicityESet) result.append(multiplicity); else result.append("<unset>"); |
| 693 | result.append(", name: "); |
| 694 | result.append(name); |
| 695 | result.append(", quantum: "); |
| 696 | if (quantumESet) result.append(quantum); else result.append("<unset>"); |
| 697 | result.append(", replication: "); |
| 698 | if (replicationESet) result.append(replication); else result.append("<unset>"); |
| 699 | result.append(", scheduling: "); |
| 700 | if (schedulingESet) result.append(scheduling); else result.append("<unset>"); |
| 701 | result.append(", speedFactor: "); |
| 702 | if (speedFactorESet) result.append(speedFactor); else result.append("<unset>"); |
| 703 | result.append(')'); |
| 704 | return result.toString(); |
| 705 | } |
| 706 | |
| 707 | } //ProcessorTypeImpl |