/**
*/
package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl;
import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region;
import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex;
import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Region'.
*
*
* The following features are implemented:
*
*
* - {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegionImpl#getVertices Vertices}
*
*
* @generated
*/
public class RegionImpl extends MinimalEObjectImpl.Container implements Region {
/**
* The cached value of the '{@link #getVertices() Vertices}' containment reference list.
*
*
* @see #getVertices()
* @generated
* @ordered
*/
protected EList vertices;
/**
*
*
* @generated
*/
protected RegionImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return yakinduPackage.Literals.REGION;
}
/**
*
*
* @generated
*/
public EList getVertices() {
if (vertices == null) {
vertices = new EObjectContainmentEList(Vertex.class, this, yakinduPackage.REGION__VERTICES);
}
return vertices;
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case yakinduPackage.REGION__VERTICES:
return ((InternalEList>)getVertices()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case yakinduPackage.REGION__VERTICES:
return getVertices();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case yakinduPackage.REGION__VERTICES:
getVertices().clear();
getVertices().addAll((Collection extends Vertex>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case yakinduPackage.REGION__VERTICES:
getVertices().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case yakinduPackage.REGION__VERTICES:
return vertices != null && !vertices.isEmpty();
}
return super.eIsSet(featureID);
}
} //RegionImpl