/** * <copyright> * </copyright> * */ package at.bestsolution.efxclipse.tooling.svgpath.svgPath.impl; import at.bestsolution.efxclipse.tooling.svgpath.svgPath.SvgPathPackage; import at.bestsolution.efxclipse.tooling.svgpath.svgPath.coordinate_pair; import at.bestsolution.efxclipse.tooling.svgpath.svgPath.lineto_argument_sequence; 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; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>lineto argument sequence</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link at.bestsolution.efxclipse.tooling.svgpath.svgPath.impl.lineto_argument_sequenceImpl#getPairs <em>Pairs</em>}</li> * </ul> * </p> * * @generated */ public class lineto_argument_sequenceImpl extends MinimalEObjectImpl.Container implements lineto_argument_sequence { /** * The cached value of the '{@link #getPairs() <em>Pairs</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getPairs() * @generated * @ordered */ protected EList<coordinate_pair> pairs; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected lineto_argument_sequenceImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return SvgPathPackage.Literals.LINETO_ARGUMENT_SEQUENCE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<coordinate_pair> getPairs() { if (pairs == null) { pairs = new EObjectContainmentEList<coordinate_pair>(coordinate_pair.class, this, SvgPathPackage.LINETO_ARGUMENT_SEQUENCE__PAIRS); } return pairs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SvgPathPackage.LINETO_ARGUMENT_SEQUENCE__PAIRS: return ((InternalEList<?>)getPairs()).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 SvgPathPackage.LINETO_ARGUMENT_SEQUENCE__PAIRS: return getPairs(); } 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 SvgPathPackage.LINETO_ARGUMENT_SEQUENCE__PAIRS: getPairs().clear(); getPairs().addAll((Collection<? extends coordinate_pair>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SvgPathPackage.LINETO_ARGUMENT_SEQUENCE__PAIRS: getPairs().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SvgPathPackage.LINETO_ARGUMENT_SEQUENCE__PAIRS: return pairs != null && !pairs.isEmpty(); } return super.eIsSet(featureID); } } //lineto_argument_sequenceImpl