/** */ package hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Equals; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * * An implementation of the model object 'Equals'. * *

* The following features are implemented: *

* * * @generated */ public class EqualsImpl extends PrimitiveRelationImpl implements Equals { /** * The cached value of the '{@link #getLeftOperand() Left Operand}' containment reference. * * * @see #getLeftOperand() * @generated * @ordered */ protected Term leftOperand; /** * The cached value of the '{@link #getRightOperand() Right Operand}' containment reference. * * * @see #getRightOperand() * @generated * @ordered */ protected Term rightOperand; /** * * * @generated */ protected EqualsImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return LogiclanguagePackage.Literals.EQUALS; } /** * * * @generated */ @Override public Term getLeftOperand() { return leftOperand; } /** * * * @generated */ public NotificationChain basicSetLeftOperand(Term newLeftOperand, NotificationChain msgs) { Term oldLeftOperand = leftOperand; leftOperand = newLeftOperand; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.EQUALS__LEFT_OPERAND, oldLeftOperand, newLeftOperand); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setLeftOperand(Term newLeftOperand) { if (newLeftOperand != leftOperand) { NotificationChain msgs = null; if (leftOperand != null) msgs = ((InternalEObject)leftOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.EQUALS__LEFT_OPERAND, null, msgs); if (newLeftOperand != null) msgs = ((InternalEObject)newLeftOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.EQUALS__LEFT_OPERAND, null, msgs); msgs = basicSetLeftOperand(newLeftOperand, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.EQUALS__LEFT_OPERAND, newLeftOperand, newLeftOperand)); } /** * * * @generated */ @Override public Term getRightOperand() { return rightOperand; } /** * * * @generated */ public NotificationChain basicSetRightOperand(Term newRightOperand, NotificationChain msgs) { Term oldRightOperand = rightOperand; rightOperand = newRightOperand; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.EQUALS__RIGHT_OPERAND, oldRightOperand, newRightOperand); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ @Override public void setRightOperand(Term newRightOperand) { if (newRightOperand != rightOperand) { NotificationChain msgs = null; if (rightOperand != null) msgs = ((InternalEObject)rightOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.EQUALS__RIGHT_OPERAND, null, msgs); if (newRightOperand != null) msgs = ((InternalEObject)newRightOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - LogiclanguagePackage.EQUALS__RIGHT_OPERAND, null, msgs); msgs = basicSetRightOperand(newRightOperand, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, LogiclanguagePackage.EQUALS__RIGHT_OPERAND, newRightOperand, newRightOperand)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case LogiclanguagePackage.EQUALS__LEFT_OPERAND: return basicSetLeftOperand(null, msgs); case LogiclanguagePackage.EQUALS__RIGHT_OPERAND: return basicSetRightOperand(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case LogiclanguagePackage.EQUALS__LEFT_OPERAND: return getLeftOperand(); case LogiclanguagePackage.EQUALS__RIGHT_OPERAND: return getRightOperand(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case LogiclanguagePackage.EQUALS__LEFT_OPERAND: setLeftOperand((Term)newValue); return; case LogiclanguagePackage.EQUALS__RIGHT_OPERAND: setRightOperand((Term)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case LogiclanguagePackage.EQUALS__LEFT_OPERAND: setLeftOperand((Term)null); return; case LogiclanguagePackage.EQUALS__RIGHT_OPERAND: setRightOperand((Term)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case LogiclanguagePackage.EQUALS__LEFT_OPERAND: return leftOperand != null; case LogiclanguagePackage.EQUALS__RIGHT_OPERAND: return rightOperand != null; } return super.eIsSet(featureID); } } //EqualsImpl