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