/** */ package hu.bme.mit.inf.dslreasoner.alloyLanguage.impl; import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSInverseRelation; import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm; import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage; 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 'ALS Inverse Relation'. * *

* The following features are implemented: *

* * * @generated */ public class ALSInverseRelationImpl extends ALSTermImpl implements ALSInverseRelation { /** * The cached value of the '{@link #getOperand() Operand}' containment reference. * * * @see #getOperand() * @generated * @ordered */ protected ALSTerm operand; /** * * * @generated */ protected ALSInverseRelationImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return AlloyLanguagePackage.Literals.ALS_INVERSE_RELATION; } /** * * * @generated */ public ALSTerm getOperand() { return operand; } /** * * * @generated */ public NotificationChain basicSetOperand(ALSTerm newOperand, NotificationChain msgs) { ALSTerm oldOperand = operand; operand = newOperand; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND, oldOperand, newOperand); if (msgs == null) msgs = notification; else msgs.add(notification); } return msgs; } /** * * * @generated */ public void setOperand(ALSTerm newOperand) { if (newOperand != operand) { NotificationChain msgs = null; if (operand != null) msgs = ((InternalEObject)operand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND, null, msgs); if (newOperand != null) msgs = ((InternalEObject)newOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND, null, msgs); msgs = basicSetOperand(newOperand, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND, newOperand, newOperand)); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND: return basicSetOperand(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND: return getOperand(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND: setOperand((ALSTerm)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND: setOperand((ALSTerm)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case AlloyLanguagePackage.ALS_INVERSE_RELATION__OPERAND: return operand != null; } return super.eIsSet(featureID); } } //ALSInverseRelationImpl