/** * <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.moveto_drawto_command_group; import at.bestsolution.efxclipse.tooling.svgpath.svgPath.moveto_drawto_command_groups; 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>moveto drawto command groups</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link at.bestsolution.efxclipse.tooling.svgpath.svgPath.impl.moveto_drawto_command_groupsImpl#getCommands <em>Commands</em>}</li> * </ul> * </p> * * @generated */ public class moveto_drawto_command_groupsImpl extends MinimalEObjectImpl.Container implements moveto_drawto_command_groups { /** * The cached value of the '{@link #getCommands() <em>Commands</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getCommands() * @generated * @ordered */ protected EList<moveto_drawto_command_group> commands; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected moveto_drawto_command_groupsImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return SvgPathPackage.Literals.MOVETO_DRAWTO_COMMAND_GROUPS; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<moveto_drawto_command_group> getCommands() { if (commands == null) { commands = new EObjectContainmentEList<moveto_drawto_command_group>(moveto_drawto_command_group.class, this, SvgPathPackage.MOVETO_DRAWTO_COMMAND_GROUPS__COMMANDS); } return commands; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SvgPathPackage.MOVETO_DRAWTO_COMMAND_GROUPS__COMMANDS: return ((InternalEList<?>)getCommands()).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.MOVETO_DRAWTO_COMMAND_GROUPS__COMMANDS: return getCommands(); } 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.MOVETO_DRAWTO_COMMAND_GROUPS__COMMANDS: getCommands().clear(); getCommands().addAll((Collection<? extends moveto_drawto_command_group>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SvgPathPackage.MOVETO_DRAWTO_COMMAND_GROUPS__COMMANDS: getCommands().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SvgPathPackage.MOVETO_DRAWTO_COMMAND_GROUPS__COMMANDS: return commands != null && !commands.isEmpty(); } return super.eIsSet(featureID); } } //moveto_drawto_command_groupsImpl