/** */ package crossingScenario.impl; import crossingScenario.Actor; import crossingScenario.CrossingScenarioPackage; import crossingScenario.VisionBlocked; import org.eclipse.emf.common.notify.Notification; 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 'Vision Blocked'. * *

* The following features are implemented: *

* * * @generated */ public class VisionBlockedImpl extends RelationImpl implements VisionBlocked { /** * The cached value of the '{@link #getBlockedBy() Blocked By}' reference. * * * @see #getBlockedBy() * @generated * @ordered */ protected Actor blockedBy; /** * * * @generated */ protected VisionBlockedImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return CrossingScenarioPackage.Literals.VISION_BLOCKED; } /** * * * @generated */ @Override public Actor getBlockedBy() { if (blockedBy != null && blockedBy.eIsProxy()) { InternalEObject oldBlockedBy = (InternalEObject)blockedBy; blockedBy = (Actor)eResolveProxy(oldBlockedBy); if (blockedBy != oldBlockedBy) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy)); } } return blockedBy; } /** * * * @generated */ public Actor basicGetBlockedBy() { return blockedBy; } /** * * * @generated */ @Override public void setBlockedBy(Actor newBlockedBy) { Actor oldBlockedBy = blockedBy; blockedBy = newBlockedBy; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: if (resolve) return getBlockedBy(); return basicGetBlockedBy(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: setBlockedBy((Actor)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: setBlockedBy((Actor)null); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CrossingScenarioPackage.VISION_BLOCKED__BLOCKED_BY: return blockedBy != null; } return super.eIsSet(featureID); } } //VisionBlockedImpl