/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipse.amalgam.tutorials.emf.droid.impl;
import org.eclipse.amalgam.tutorials.emf.droid.DroidPackage;
import org.eclipse.amalgam.tutorials.emf.droid.InterpolatorRA;
import org.eclipse.amalgam.tutorials.emf.droid.InterpolatorVA;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Interpolator VA</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.amalgam.tutorials.emf.droid.impl.InterpolatorVAImpl#getAccess <em>Access</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class InterpolatorVAImpl extends ValueAccessImpl implements InterpolatorVA {
/**
* The cached value of the '{@link #getAccess() <em>Access</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAccess()
* @generated
* @ordered
*/
protected InterpolatorRA access;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected InterpolatorVAImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return DroidPackage.eINSTANCE.getInterpolatorVA();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InterpolatorRA getAccess() {
return access;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetAccess(InterpolatorRA newAccess, NotificationChain msgs) {
InterpolatorRA oldAccess = access;
access = newAccess;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, DroidPackage.INTERPOLATOR_VA__ACCESS, oldAccess, newAccess);
if (msgs == null) msgs = notification; else msgs.add(notification);
}
return msgs;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setAccess(InterpolatorRA newAccess) {
if (newAccess != access) {
NotificationChain msgs = null;
if (access != null)
msgs = ((InternalEObject)access).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - DroidPackage.INTERPOLATOR_VA__ACCESS, null, msgs);
if (newAccess != null)
msgs = ((InternalEObject)newAccess).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - DroidPackage.INTERPOLATOR_VA__ACCESS, null, msgs);
msgs = basicSetAccess(newAccess, msgs);
if (msgs != null) msgs.dispatch();
}
else if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, DroidPackage.INTERPOLATOR_VA__ACCESS, newAccess, newAccess));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case DroidPackage.INTERPOLATOR_VA__ACCESS:
return basicSetAccess(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case DroidPackage.INTERPOLATOR_VA__ACCESS:
return getAccess();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case DroidPackage.INTERPOLATOR_VA__ACCESS:
setAccess((InterpolatorRA)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DroidPackage.INTERPOLATOR_VA__ACCESS:
setAccess((InterpolatorRA)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DroidPackage.INTERPOLATOR_VA__ACCESS:
return access != null;
}
return super.eIsSet(featureID);
}
} //InterpolatorVAImpl