/** */ package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition; 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.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'Vertex'. * *

* The following features are implemented: *

* * * @generated */ public abstract class VertexImpl extends MinimalEObjectImpl.Container implements Vertex { /** * The cached value of the '{@link #getIncomingTransitions() Incoming Transitions}' reference list. * * * @see #getIncomingTransitions() * @generated * @ordered */ protected EList incomingTransitions; /** * The cached value of the '{@link #getOutgoingTransitions() Outgoing Transitions}' containment reference list. * * * @see #getOutgoingTransitions() * @generated * @ordered */ protected EList outgoingTransitions; /** * * * @generated */ protected VertexImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return yakinduPackage.Literals.VERTEX; } /** * * * @generated */ public EList getIncomingTransitions() { if (incomingTransitions == null) { incomingTransitions = new EObjectWithInverseResolvingEList(Transition.class, this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, yakinduPackage.TRANSITION__TARGET); } return incomingTransitions; } /** * * * @generated */ public EList getOutgoingTransitions() { if (outgoingTransitions == null) { outgoingTransitions = new EObjectContainmentWithInverseEList(Transition.class, this, yakinduPackage.VERTEX__OUTGOING_TRANSITIONS, yakinduPackage.TRANSITION__SOURCE); } return outgoingTransitions; } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: return ((InternalEList)(InternalEList)getIncomingTransitions()).basicAdd(otherEnd, msgs); case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: return ((InternalEList)(InternalEList)getOutgoingTransitions()).basicAdd(otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: return ((InternalEList)getIncomingTransitions()).basicRemove(otherEnd, msgs); case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: return ((InternalEList)getOutgoingTransitions()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: return getIncomingTransitions(); case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: return getOutgoingTransitions(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: getIncomingTransitions().clear(); getIncomingTransitions().addAll((Collection)newValue); return; case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: getOutgoingTransitions().clear(); getOutgoingTransitions().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: getIncomingTransitions().clear(); return; case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: getOutgoingTransitions().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: return incomingTransitions != null && !incomingTransitions.isEmpty(); case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: return outgoingTransitions != null && !outgoingTransitions.isEmpty(); } return super.eIsSet(featureID); } } //VertexImpl