/**
*/
package simpleScenario.impl;
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;
import simpleScenario.Actor;
import simpleScenario.SimpleScenarioPackage;
import simpleScenario.VisionBlocked;
/**
*
* An implementation of the model object 'Vision Blocked'.
*
*
* The following features are implemented:
*
*
* - {@link simpleScenario.impl.VisionBlockedImpl#getBlockedBy Blocked By}
*
*
* @generated
*/
public class VisionBlockedImpl extends SpatialRelationImpl 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 SimpleScenarioPackage.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, SimpleScenarioPackage.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, SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY, oldBlockedBy, blockedBy));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case SimpleScenarioPackage.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 SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY:
setBlockedBy((Actor)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY:
setBlockedBy((Actor)null);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case SimpleScenarioPackage.VISION_BLOCKED__BLOCKED_BY:
return blockedBy != null;
}
return super.eIsSet(featureID);
}
} //VisionBlockedImpl