/** */ package org.eclipse.qvto.examples.xtext.qvtoperationalcs.impl; 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.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; import org.eclipse.ocl.xtext.basecs.impl.PivotableElementCSImpl; import org.eclipse.ocl.xtext.basecs.util.BaseCSVisitor; import org.eclipse.qvto.examples.xtext.qvtoperationalcs.PathElement2CS; import org.eclipse.qvto.examples.xtext.qvtoperationalcs.PathName2CS; import org.eclipse.qvto.examples.xtext.qvtoperationalcs.QVTOperationalCSPackage; import org.eclipse.qvto.examples.xtext.qvtoperationalcs.util.QVTOperationalCSVisitor; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Path Name2 CS</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link org.eclipse.qvto.examples.xtext.qvtoperationalcs.impl.PathName2CSImpl#getOwnedPathElements2 <em>Owned Path Elements2</em>}</li> * </ul> * * @generated */ public class PathName2CSImpl extends PivotableElementCSImpl implements PathName2CS { /** * The cached value of the '{@link #getOwnedPathElements2() <em>Owned Path Elements2</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getOwnedPathElements2() * @generated * @ordered */ protected EList<PathElement2CS> ownedPathElements2; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected PathName2CSImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return QVTOperationalCSPackage.Literals.PATH_NAME2_CS; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<PathElement2CS> getOwnedPathElements2() { if (ownedPathElements2 == null) { ownedPathElements2 = new EObjectContainmentEList<PathElement2CS>(PathElement2CS.class, this, QVTOperationalCSPackage.PATH_NAME2_CS__OWNED_PATH_ELEMENTS2); } return ownedPathElements2; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case QVTOperationalCSPackage.PATH_NAME2_CS__OWNED_PATH_ELEMENTS2: return ((InternalEList<?>)getOwnedPathElements2()).basicRemove(otherEnd, 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 QVTOperationalCSPackage.PATH_NAME2_CS__OWNED_PATH_ELEMENTS2: return getOwnedPathElements2(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case QVTOperationalCSPackage.PATH_NAME2_CS__OWNED_PATH_ELEMENTS2: getOwnedPathElements2().clear(); getOwnedPathElements2().addAll((Collection<? extends PathElement2CS>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case QVTOperationalCSPackage.PATH_NAME2_CS__OWNED_PATH_ELEMENTS2: getOwnedPathElements2().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case QVTOperationalCSPackage.PATH_NAME2_CS__OWNED_PATH_ELEMENTS2: return ownedPathElements2 != null && !ownedPathElements2.isEmpty(); } return super.eIsSet(featureID); } /** * {@inheritDoc} * @generated */ @SuppressWarnings("unchecked") @Override public <R> R accept(BaseCSVisitor<R> visitor) { return (R) ((QVTOperationalCSVisitor<?>)visitor).visitPathName2CS(this); } } //PathName2CSImpl