| 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.PragmaType; |
| 12 | import LqnCore.ResultGeneralType; |
| 13 | import LqnCore.SolverParamsType; |
| 14 | |
| 15 | import java.util.Collection; |
| 16 | |
| 17 | import org.eclipse.emf.common.notify.Notification; |
| 18 | import org.eclipse.emf.common.notify.NotificationChain; |
| 19 | |
| 20 | import org.eclipse.emf.common.util.EList; |
| 21 | |
| 22 | import org.eclipse.emf.ecore.EClass; |
| 23 | import org.eclipse.emf.ecore.InternalEObject; |
| 24 | |
| 25 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| 26 | import org.eclipse.emf.ecore.impl.EObjectImpl; |
| 27 | |
| 28 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; |
| 29 | import org.eclipse.emf.ecore.util.InternalEList; |
| 30 | |
| 31 | /** |
| 32 | * <!-- begin-user-doc --> |
| 33 | * An implementation of the model object '<em><b>Solver Params Type</b></em>'. |
| 34 | * <!-- end-user-doc --> |
| 35 | * <p> |
| 36 | * The following features are implemented: |
| 37 | * <ul> |
| 38 | * <li>{@link LqnCore.impl.SolverParamsTypeImpl#getResultGeneral <em>Result General</em>}</li> |
| 39 | * <li>{@link LqnCore.impl.SolverParamsTypeImpl#getPragma <em>Pragma</em>}</li> |
| 40 | * <li>{@link LqnCore.impl.SolverParamsTypeImpl#getComment <em>Comment</em>}</li> |
| 41 | * <li>{@link LqnCore.impl.SolverParamsTypeImpl#getConvVal <em>Conv Val</em>}</li> |
| 42 | * <li>{@link LqnCore.impl.SolverParamsTypeImpl#getItLimit <em>It Limit</em>}</li> |
| 43 | * <li>{@link LqnCore.impl.SolverParamsTypeImpl#getPrintInt <em>Print Int</em>}</li> |
| 44 | * <li>{@link LqnCore.impl.SolverParamsTypeImpl#getUnderrelaxCoeff <em>Underrelax Coeff</em>}</li> |
| 45 | * </ul> |
| 46 | * </p> |
| 47 | * |
| 48 | * @generated |
| 49 | */ |
| 50 | public class SolverParamsTypeImpl extends EObjectImpl implements SolverParamsType { |
| 51 | /** |
| 52 | * The cached value of the '{@link #getResultGeneral() <em>Result General</em>}' containment reference. |
| 53 | * <!-- begin-user-doc --> |
| 54 | * <!-- end-user-doc --> |
| 55 | * @see #getResultGeneral() |
| 56 | * @generated |
| 57 | * @ordered |
| 58 | */ |
| 59 | protected ResultGeneralType resultGeneral; |
| 60 | |
| 61 | /** |
| 62 | * The cached value of the '{@link #getPragma() <em>Pragma</em>}' containment reference list. |
| 63 | * <!-- begin-user-doc --> |
| 64 | * <!-- end-user-doc --> |
| 65 | * @see #getPragma() |
| 66 | * @generated |
| 67 | * @ordered |
| 68 | */ |
| 69 | protected EList<PragmaType> pragma; |
| 70 | |
| 71 | /** |
| 72 | * The default value of the '{@link #getComment() <em>Comment</em>}' attribute. |
| 73 | * <!-- begin-user-doc --> |
| 74 | * <!-- end-user-doc --> |
| 75 | * @see #getComment() |
| 76 | * @generated |
| 77 | * @ordered |
| 78 | */ |
| 79 | protected static final String COMMENT_EDEFAULT = ""; |
| 80 | |
| 81 | /** |
| 82 | * The cached value of the '{@link #getComment() <em>Comment</em>}' attribute. |
| 83 | * <!-- begin-user-doc --> |
| 84 | * <!-- end-user-doc --> |
| 85 | * @see #getComment() |
| 86 | * @generated |
| 87 | * @ordered |
| 88 | */ |
| 89 | protected String comment = COMMENT_EDEFAULT; |
| 90 | |
| 91 | /** |
| 92 | * This is true if the Comment attribute has been set. |
| 93 | * <!-- begin-user-doc --> |
| 94 | * <!-- end-user-doc --> |
| 95 | * @generated |
| 96 | * @ordered |
| 97 | */ |
| 98 | protected boolean commentESet; |
| 99 | |
| 100 | /** |
| 101 | * The default value of the '{@link #getConvVal() <em>Conv Val</em>}' attribute. |
| 102 | * <!-- begin-user-doc --> |
| 103 | * <!-- end-user-doc --> |
| 104 | * @see #getConvVal() |
| 105 | * @generated |
| 106 | * @ordered |
| 107 | */ |
| 108 | protected static final Object CONV_VAL_EDEFAULT = LqnCoreFactory.eINSTANCE.createFromString(LqnCorePackage.eINSTANCE.getSrvnFloat(), "1"); |
| 109 | |
| 110 | /** |
| 111 | * The cached value of the '{@link #getConvVal() <em>Conv Val</em>}' attribute. |
| 112 | * <!-- begin-user-doc --> |
| 113 | * <!-- end-user-doc --> |
| 114 | * @see #getConvVal() |
| 115 | * @generated |
| 116 | * @ordered |
| 117 | */ |
| 118 | protected Object convVal = CONV_VAL_EDEFAULT; |
| 119 | |
| 120 | /** |
| 121 | * This is true if the Conv Val attribute has been set. |
| 122 | * <!-- begin-user-doc --> |
| 123 | * <!-- end-user-doc --> |
| 124 | * @generated |
| 125 | * @ordered |
| 126 | */ |
| 127 | protected boolean convValESet; |
| 128 | |
| 129 | /** |
| 130 | * The default value of the '{@link #getItLimit() <em>It Limit</em>}' attribute. |
| 131 | * <!-- begin-user-doc --> |
| 132 | * <!-- end-user-doc --> |
| 133 | * @see #getItLimit() |
| 134 | * @generated |
| 135 | * @ordered |
| 136 | */ |
| 137 | protected static final int IT_LIMIT_EDEFAULT = 50; |
| 138 | |
| 139 | /** |
| 140 | * The cached value of the '{@link #getItLimit() <em>It Limit</em>}' attribute. |
| 141 | * <!-- begin-user-doc --> |
| 142 | * <!-- end-user-doc --> |
| 143 | * @see #getItLimit() |
| 144 | * @generated |
| 145 | * @ordered |
| 146 | */ |
| 147 | protected int itLimit = IT_LIMIT_EDEFAULT; |
| 148 | |
| 149 | /** |
| 150 | * This is true if the It Limit attribute has been set. |
| 151 | * <!-- begin-user-doc --> |
| 152 | * <!-- end-user-doc --> |
| 153 | * @generated |
| 154 | * @ordered |
| 155 | */ |
| 156 | protected boolean itLimitESet; |
| 157 | |
| 158 | /** |
| 159 | * The default value of the '{@link #getPrintInt() <em>Print Int</em>}' attribute. |
| 160 | * <!-- begin-user-doc --> |
| 161 | * <!-- end-user-doc --> |
| 162 | * @see #getPrintInt() |
| 163 | * @generated |
| 164 | * @ordered |
| 165 | */ |
| 166 | protected static final int PRINT_INT_EDEFAULT = 0; |
| 167 | |
| 168 | /** |
| 169 | * The cached value of the '{@link #getPrintInt() <em>Print Int</em>}' attribute. |
| 170 | * <!-- begin-user-doc --> |
| 171 | * <!-- end-user-doc --> |
| 172 | * @see #getPrintInt() |
| 173 | * @generated |
| 174 | * @ordered |
| 175 | */ |
| 176 | protected int printInt = PRINT_INT_EDEFAULT; |
| 177 | |
| 178 | /** |
| 179 | * This is true if the Print Int attribute has been set. |
| 180 | * <!-- begin-user-doc --> |
| 181 | * <!-- end-user-doc --> |
| 182 | * @generated |
| 183 | * @ordered |
| 184 | */ |
| 185 | protected boolean printIntESet; |
| 186 | |
| 187 | /** |
| 188 | * The default value of the '{@link #getUnderrelaxCoeff() <em>Underrelax Coeff</em>}' attribute. |
| 189 | * <!-- begin-user-doc --> |
| 190 | * <!-- end-user-doc --> |
| 191 | * @see #getUnderrelaxCoeff() |
| 192 | * @generated |
| 193 | * @ordered |
| 194 | */ |
| 195 | protected static final Object UNDERRELAX_COEFF_EDEFAULT = LqnCoreFactory.eINSTANCE.createFromString(LqnCorePackage.eINSTANCE.getSrvnFloat(), "1"); |
| 196 | |
| 197 | /** |
| 198 | * The cached value of the '{@link #getUnderrelaxCoeff() <em>Underrelax Coeff</em>}' attribute. |
| 199 | * <!-- begin-user-doc --> |
| 200 | * <!-- end-user-doc --> |
| 201 | * @see #getUnderrelaxCoeff() |
| 202 | * @generated |
| 203 | * @ordered |
| 204 | */ |
| 205 | protected Object underrelaxCoeff = UNDERRELAX_COEFF_EDEFAULT; |
| 206 | |
| 207 | /** |
| 208 | * This is true if the Underrelax Coeff attribute has been set. |
| 209 | * <!-- begin-user-doc --> |
| 210 | * <!-- end-user-doc --> |
| 211 | * @generated |
| 212 | * @ordered |
| 213 | */ |
| 214 | protected boolean underrelaxCoeffESet; |
| 215 | |
| 216 | /** |
| 217 | * <!-- begin-user-doc --> |
| 218 | * <!-- end-user-doc --> |
| 219 | * @generated |
| 220 | */ |
| 221 | protected SolverParamsTypeImpl() { |
| 222 | super(); |
| 223 | } |
| 224 | |
| 225 | /** |
| 226 | * <!-- begin-user-doc --> |
| 227 | * <!-- end-user-doc --> |
| 228 | * @generated |
| 229 | */ |
| 230 | @Override |
| 231 | protected EClass eStaticClass() { |
| 232 | return LqnCorePackage.Literals.SOLVER_PARAMS_TYPE; |
| 233 | } |
| 234 | |
| 235 | /** |
| 236 | * <!-- begin-user-doc --> |
| 237 | * <!-- end-user-doc --> |
| 238 | * @generated |
| 239 | */ |
| 240 | public ResultGeneralType getResultGeneral() { |
| 241 | return resultGeneral; |
| 242 | } |
| 243 | |
| 244 | /** |
| 245 | * <!-- begin-user-doc --> |
| 246 | * <!-- end-user-doc --> |
| 247 | * @generated |
| 248 | */ |
| 249 | public NotificationChain basicSetResultGeneral(ResultGeneralType newResultGeneral, NotificationChain msgs) { |
| 250 | ResultGeneralType oldResultGeneral = resultGeneral; |
| 251 | resultGeneral = newResultGeneral; |
| 252 | if (eNotificationRequired()) { |
| 253 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL, oldResultGeneral, newResultGeneral); |
| 254 | if (msgs == null) msgs = notification; else msgs.add(notification); |
| 255 | } |
| 256 | return msgs; |
| 257 | } |
| 258 | |
| 259 | /** |
| 260 | * <!-- begin-user-doc --> |
| 261 | * <!-- end-user-doc --> |
| 262 | * @generated |
| 263 | */ |
| 264 | public void setResultGeneral(ResultGeneralType newResultGeneral) { |
| 265 | if (newResultGeneral != resultGeneral) { |
| 266 | NotificationChain msgs = null; |
| 267 | if (resultGeneral != null) |
| 268 | msgs = ((InternalEObject)resultGeneral).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL, null, msgs); |
| 269 | if (newResultGeneral != null) |
| 270 | msgs = ((InternalEObject)newResultGeneral).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL, null, msgs); |
| 271 | msgs = basicSetResultGeneral(newResultGeneral, msgs); |
| 272 | if (msgs != null) msgs.dispatch(); |
| 273 | } |
| 274 | else if (eNotificationRequired()) |
| 275 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL, newResultGeneral, newResultGeneral)); |
| 276 | } |
| 277 | |
| 278 | /** |
| 279 | * <!-- begin-user-doc --> |
| 280 | * <!-- end-user-doc --> |
| 281 | * @generated |
| 282 | */ |
| 283 | public EList<PragmaType> getPragma() { |
| 284 | if (pragma == null) { |
| 285 | pragma = new EObjectContainmentEList<PragmaType>(PragmaType.class, this, LqnCorePackage.SOLVER_PARAMS_TYPE__PRAGMA); |
| 286 | } |
| 287 | return pragma; |
| 288 | } |
| 289 | |
| 290 | /** |
| 291 | * <!-- begin-user-doc --> |
| 292 | * <!-- end-user-doc --> |
| 293 | * @generated |
| 294 | */ |
| 295 | public String getComment() { |
| 296 | return comment; |
| 297 | } |
| 298 | |
| 299 | /** |
| 300 | * <!-- begin-user-doc --> |
| 301 | * <!-- end-user-doc --> |
| 302 | * @generated |
| 303 | */ |
| 304 | public void setComment(String newComment) { |
| 305 | String oldComment = comment; |
| 306 | comment = newComment; |
| 307 | boolean oldCommentESet = commentESet; |
| 308 | commentESet = true; |
| 309 | if (eNotificationRequired()) |
| 310 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.SOLVER_PARAMS_TYPE__COMMENT, oldComment, comment, !oldCommentESet)); |
| 311 | } |
| 312 | |
| 313 | /** |
| 314 | * <!-- begin-user-doc --> |
| 315 | * <!-- end-user-doc --> |
| 316 | * @generated |
| 317 | */ |
| 318 | public void unsetComment() { |
| 319 | String oldComment = comment; |
| 320 | boolean oldCommentESet = commentESet; |
| 321 | comment = COMMENT_EDEFAULT; |
| 322 | commentESet = false; |
| 323 | if (eNotificationRequired()) |
| 324 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.SOLVER_PARAMS_TYPE__COMMENT, oldComment, COMMENT_EDEFAULT, oldCommentESet)); |
| 325 | } |
| 326 | |
| 327 | /** |
| 328 | * <!-- begin-user-doc --> |
| 329 | * <!-- end-user-doc --> |
| 330 | * @generated |
| 331 | */ |
| 332 | public boolean isSetComment() { |
| 333 | return commentESet; |
| 334 | } |
| 335 | |
| 336 | /** |
| 337 | * <!-- begin-user-doc --> |
| 338 | * <!-- end-user-doc --> |
| 339 | * @generated |
| 340 | */ |
| 341 | public Object getConvVal() { |
| 342 | return convVal; |
| 343 | } |
| 344 | |
| 345 | /** |
| 346 | * <!-- begin-user-doc --> |
| 347 | * <!-- end-user-doc --> |
| 348 | * @generated |
| 349 | */ |
| 350 | public void setConvVal(Object newConvVal) { |
| 351 | Object oldConvVal = convVal; |
| 352 | convVal = newConvVal; |
| 353 | boolean oldConvValESet = convValESet; |
| 354 | convValESet = true; |
| 355 | if (eNotificationRequired()) |
| 356 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.SOLVER_PARAMS_TYPE__CONV_VAL, oldConvVal, convVal, !oldConvValESet)); |
| 357 | } |
| 358 | |
| 359 | /** |
| 360 | * <!-- begin-user-doc --> |
| 361 | * <!-- end-user-doc --> |
| 362 | * @generated |
| 363 | */ |
| 364 | public void unsetConvVal() { |
| 365 | Object oldConvVal = convVal; |
| 366 | boolean oldConvValESet = convValESet; |
| 367 | convVal = CONV_VAL_EDEFAULT; |
| 368 | convValESet = false; |
| 369 | if (eNotificationRequired()) |
| 370 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.SOLVER_PARAMS_TYPE__CONV_VAL, oldConvVal, CONV_VAL_EDEFAULT, oldConvValESet)); |
| 371 | } |
| 372 | |
| 373 | /** |
| 374 | * <!-- begin-user-doc --> |
| 375 | * <!-- end-user-doc --> |
| 376 | * @generated |
| 377 | */ |
| 378 | public boolean isSetConvVal() { |
| 379 | return convValESet; |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * <!-- begin-user-doc --> |
| 384 | * <!-- end-user-doc --> |
| 385 | * @generated |
| 386 | */ |
| 387 | public int getItLimit() { |
| 388 | return itLimit; |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * <!-- begin-user-doc --> |
| 393 | * <!-- end-user-doc --> |
| 394 | * @generated |
| 395 | */ |
| 396 | public void setItLimit(int newItLimit) { |
| 397 | int oldItLimit = itLimit; |
| 398 | itLimit = newItLimit; |
| 399 | boolean oldItLimitESet = itLimitESet; |
| 400 | itLimitESet = true; |
| 401 | if (eNotificationRequired()) |
| 402 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.SOLVER_PARAMS_TYPE__IT_LIMIT, oldItLimit, itLimit, !oldItLimitESet)); |
| 403 | } |
| 404 | |
| 405 | /** |
| 406 | * <!-- begin-user-doc --> |
| 407 | * <!-- end-user-doc --> |
| 408 | * @generated |
| 409 | */ |
| 410 | public void unsetItLimit() { |
| 411 | int oldItLimit = itLimit; |
| 412 | boolean oldItLimitESet = itLimitESet; |
| 413 | itLimit = IT_LIMIT_EDEFAULT; |
| 414 | itLimitESet = false; |
| 415 | if (eNotificationRequired()) |
| 416 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.SOLVER_PARAMS_TYPE__IT_LIMIT, oldItLimit, IT_LIMIT_EDEFAULT, oldItLimitESet)); |
| 417 | } |
| 418 | |
| 419 | /** |
| 420 | * <!-- begin-user-doc --> |
| 421 | * <!-- end-user-doc --> |
| 422 | * @generated |
| 423 | */ |
| 424 | public boolean isSetItLimit() { |
| 425 | return itLimitESet; |
| 426 | } |
| 427 | |
| 428 | /** |
| 429 | * <!-- begin-user-doc --> |
| 430 | * <!-- end-user-doc --> |
| 431 | * @generated |
| 432 | */ |
| 433 | public int getPrintInt() { |
| 434 | return printInt; |
| 435 | } |
| 436 | |
| 437 | /** |
| 438 | * <!-- begin-user-doc --> |
| 439 | * <!-- end-user-doc --> |
| 440 | * @generated |
| 441 | */ |
| 442 | public void setPrintInt(int newPrintInt) { |
| 443 | int oldPrintInt = printInt; |
| 444 | printInt = newPrintInt; |
| 445 | boolean oldPrintIntESet = printIntESet; |
| 446 | printIntESet = true; |
| 447 | if (eNotificationRequired()) |
| 448 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.SOLVER_PARAMS_TYPE__PRINT_INT, oldPrintInt, printInt, !oldPrintIntESet)); |
| 449 | } |
| 450 | |
| 451 | /** |
| 452 | * <!-- begin-user-doc --> |
| 453 | * <!-- end-user-doc --> |
| 454 | * @generated |
| 455 | */ |
| 456 | public void unsetPrintInt() { |
| 457 | int oldPrintInt = printInt; |
| 458 | boolean oldPrintIntESet = printIntESet; |
| 459 | printInt = PRINT_INT_EDEFAULT; |
| 460 | printIntESet = false; |
| 461 | if (eNotificationRequired()) |
| 462 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.SOLVER_PARAMS_TYPE__PRINT_INT, oldPrintInt, PRINT_INT_EDEFAULT, oldPrintIntESet)); |
| 463 | } |
| 464 | |
| 465 | /** |
| 466 | * <!-- begin-user-doc --> |
| 467 | * <!-- end-user-doc --> |
| 468 | * @generated |
| 469 | */ |
| 470 | public boolean isSetPrintInt() { |
| 471 | return printIntESet; |
| 472 | } |
| 473 | |
| 474 | /** |
| 475 | * <!-- begin-user-doc --> |
| 476 | * <!-- end-user-doc --> |
| 477 | * @generated |
| 478 | */ |
| 479 | public Object getUnderrelaxCoeff() { |
| 480 | return underrelaxCoeff; |
| 481 | } |
| 482 | |
| 483 | /** |
| 484 | * <!-- begin-user-doc --> |
| 485 | * <!-- end-user-doc --> |
| 486 | * @generated |
| 487 | */ |
| 488 | public void setUnderrelaxCoeff(Object newUnderrelaxCoeff) { |
| 489 | Object oldUnderrelaxCoeff = underrelaxCoeff; |
| 490 | underrelaxCoeff = newUnderrelaxCoeff; |
| 491 | boolean oldUnderrelaxCoeffESet = underrelaxCoeffESet; |
| 492 | underrelaxCoeffESet = true; |
| 493 | if (eNotificationRequired()) |
| 494 | eNotify(new ENotificationImpl(this, Notification.SET, LqnCorePackage.SOLVER_PARAMS_TYPE__UNDERRELAX_COEFF, oldUnderrelaxCoeff, underrelaxCoeff, !oldUnderrelaxCoeffESet)); |
| 495 | } |
| 496 | |
| 497 | /** |
| 498 | * <!-- begin-user-doc --> |
| 499 | * <!-- end-user-doc --> |
| 500 | * @generated |
| 501 | */ |
| 502 | public void unsetUnderrelaxCoeff() { |
| 503 | Object oldUnderrelaxCoeff = underrelaxCoeff; |
| 504 | boolean oldUnderrelaxCoeffESet = underrelaxCoeffESet; |
| 505 | underrelaxCoeff = UNDERRELAX_COEFF_EDEFAULT; |
| 506 | underrelaxCoeffESet = false; |
| 507 | if (eNotificationRequired()) |
| 508 | eNotify(new ENotificationImpl(this, Notification.UNSET, LqnCorePackage.SOLVER_PARAMS_TYPE__UNDERRELAX_COEFF, oldUnderrelaxCoeff, UNDERRELAX_COEFF_EDEFAULT, oldUnderrelaxCoeffESet)); |
| 509 | } |
| 510 | |
| 511 | /** |
| 512 | * <!-- begin-user-doc --> |
| 513 | * <!-- end-user-doc --> |
| 514 | * @generated |
| 515 | */ |
| 516 | public boolean isSetUnderrelaxCoeff() { |
| 517 | return underrelaxCoeffESet; |
| 518 | } |
| 519 | |
| 520 | /** |
| 521 | * <!-- begin-user-doc --> |
| 522 | * <!-- end-user-doc --> |
| 523 | * @generated |
| 524 | */ |
| 525 | @Override |
| 526 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
| 527 | switch (featureID) { |
| 528 | case LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL: |
| 529 | return basicSetResultGeneral(null, msgs); |
| 530 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRAGMA: |
| 531 | return ((InternalEList<?>)getPragma()).basicRemove(otherEnd, msgs); |
| 532 | } |
| 533 | return super.eInverseRemove(otherEnd, featureID, msgs); |
| 534 | } |
| 535 | |
| 536 | /** |
| 537 | * <!-- begin-user-doc --> |
| 538 | * <!-- end-user-doc --> |
| 539 | * @generated |
| 540 | */ |
| 541 | @Override |
| 542 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| 543 | switch (featureID) { |
| 544 | case LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL: |
| 545 | return getResultGeneral(); |
| 546 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRAGMA: |
| 547 | return getPragma(); |
| 548 | case LqnCorePackage.SOLVER_PARAMS_TYPE__COMMENT: |
| 549 | return getComment(); |
| 550 | case LqnCorePackage.SOLVER_PARAMS_TYPE__CONV_VAL: |
| 551 | return getConvVal(); |
| 552 | case LqnCorePackage.SOLVER_PARAMS_TYPE__IT_LIMIT: |
| 553 | return new Integer(getItLimit()); |
| 554 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRINT_INT: |
| 555 | return new Integer(getPrintInt()); |
| 556 | case LqnCorePackage.SOLVER_PARAMS_TYPE__UNDERRELAX_COEFF: |
| 557 | return getUnderrelaxCoeff(); |
| 558 | } |
| 559 | return super.eGet(featureID, resolve, coreType); |
| 560 | } |
| 561 | |
| 562 | /** |
| 563 | * <!-- begin-user-doc --> |
| 564 | * <!-- end-user-doc --> |
| 565 | * @generated |
| 566 | */ |
| 567 | @SuppressWarnings("unchecked") |
| 568 | @Override |
| 569 | public void eSet(int featureID, Object newValue) { |
| 570 | switch (featureID) { |
| 571 | case LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL: |
| 572 | setResultGeneral((ResultGeneralType)newValue); |
| 573 | return; |
| 574 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRAGMA: |
| 575 | getPragma().clear(); |
| 576 | getPragma().addAll((Collection<? extends PragmaType>)newValue); |
| 577 | return; |
| 578 | case LqnCorePackage.SOLVER_PARAMS_TYPE__COMMENT: |
| 579 | setComment((String)newValue); |
| 580 | return; |
| 581 | case LqnCorePackage.SOLVER_PARAMS_TYPE__CONV_VAL: |
| 582 | setConvVal(newValue); |
| 583 | return; |
| 584 | case LqnCorePackage.SOLVER_PARAMS_TYPE__IT_LIMIT: |
| 585 | setItLimit(((Integer)newValue).intValue()); |
| 586 | return; |
| 587 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRINT_INT: |
| 588 | setPrintInt(((Integer)newValue).intValue()); |
| 589 | return; |
| 590 | case LqnCorePackage.SOLVER_PARAMS_TYPE__UNDERRELAX_COEFF: |
| 591 | setUnderrelaxCoeff(newValue); |
| 592 | return; |
| 593 | } |
| 594 | super.eSet(featureID, newValue); |
| 595 | } |
| 596 | |
| 597 | /** |
| 598 | * <!-- begin-user-doc --> |
| 599 | * <!-- end-user-doc --> |
| 600 | * @generated |
| 601 | */ |
| 602 | @Override |
| 603 | public void eUnset(int featureID) { |
| 604 | switch (featureID) { |
| 605 | case LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL: |
| 606 | setResultGeneral((ResultGeneralType)null); |
| 607 | return; |
| 608 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRAGMA: |
| 609 | getPragma().clear(); |
| 610 | return; |
| 611 | case LqnCorePackage.SOLVER_PARAMS_TYPE__COMMENT: |
| 612 | unsetComment(); |
| 613 | return; |
| 614 | case LqnCorePackage.SOLVER_PARAMS_TYPE__CONV_VAL: |
| 615 | unsetConvVal(); |
| 616 | return; |
| 617 | case LqnCorePackage.SOLVER_PARAMS_TYPE__IT_LIMIT: |
| 618 | unsetItLimit(); |
| 619 | return; |
| 620 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRINT_INT: |
| 621 | unsetPrintInt(); |
| 622 | return; |
| 623 | case LqnCorePackage.SOLVER_PARAMS_TYPE__UNDERRELAX_COEFF: |
| 624 | unsetUnderrelaxCoeff(); |
| 625 | return; |
| 626 | } |
| 627 | super.eUnset(featureID); |
| 628 | } |
| 629 | |
| 630 | /** |
| 631 | * <!-- begin-user-doc --> |
| 632 | * <!-- end-user-doc --> |
| 633 | * @generated |
| 634 | */ |
| 635 | @Override |
| 636 | public boolean eIsSet(int featureID) { |
| 637 | switch (featureID) { |
| 638 | case LqnCorePackage.SOLVER_PARAMS_TYPE__RESULT_GENERAL: |
| 639 | return resultGeneral != null; |
| 640 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRAGMA: |
| 641 | return pragma != null && !pragma.isEmpty(); |
| 642 | case LqnCorePackage.SOLVER_PARAMS_TYPE__COMMENT: |
| 643 | return isSetComment(); |
| 644 | case LqnCorePackage.SOLVER_PARAMS_TYPE__CONV_VAL: |
| 645 | return isSetConvVal(); |
| 646 | case LqnCorePackage.SOLVER_PARAMS_TYPE__IT_LIMIT: |
| 647 | return isSetItLimit(); |
| 648 | case LqnCorePackage.SOLVER_PARAMS_TYPE__PRINT_INT: |
| 649 | return isSetPrintInt(); |
| 650 | case LqnCorePackage.SOLVER_PARAMS_TYPE__UNDERRELAX_COEFF: |
| 651 | return isSetUnderrelaxCoeff(); |
| 652 | } |
| 653 | return super.eIsSet(featureID); |
| 654 | } |
| 655 | |
| 656 | /** |
| 657 | * <!-- begin-user-doc --> |
| 658 | * <!-- end-user-doc --> |
| 659 | * @generated |
| 660 | */ |
| 661 | @Override |
| 662 | public String toString() { |
| 663 | if (eIsProxy()) return super.toString(); |
| 664 | |
| 665 | StringBuffer result = new StringBuffer(super.toString()); |
| 666 | result.append(" (comment: "); |
| 667 | if (commentESet) result.append(comment); else result.append("<unset>"); |
| 668 | result.append(", convVal: "); |
| 669 | if (convValESet) result.append(convVal); else result.append("<unset>"); |
| 670 | result.append(", itLimit: "); |
| 671 | if (itLimitESet) result.append(itLimit); else result.append("<unset>"); |
| 672 | result.append(", printInt: "); |
| 673 | if (printIntESet) result.append(printInt); else result.append("<unset>"); |
| 674 | result.append(", underrelaxCoeff: "); |
| 675 | if (underrelaxCoeffESet) result.append(underrelaxCoeff); else result.append("<unset>"); |
| 676 | result.append(')'); |
| 677 | return result.toString(); |
| 678 | } |
| 679 | |
| 680 | } //SolverParamsTypeImpl |