/** * generated by Xtext 2.10.0 */ package com.arm.cmsis.pack.debugseq.debugSeq.impl; import com.arm.cmsis.pack.debugseq.debugSeq.DebugSeqPackage; import com.arm.cmsis.pack.debugseq.debugSeq.Sequence; import com.arm.cmsis.pack.debugseq.debugSeq.Sequences; 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>Sequences</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link com.arm.cmsis.pack.debugseq.debugSeq.impl.SequencesImpl#getSequences <em>Sequences</em>}</li> * </ul> * * @generated */ public class SequencesImpl extends MinimalEObjectImpl.Container implements Sequences { /** * The cached value of the '{@link #getSequences() <em>Sequences</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getSequences() * @generated * @ordered */ protected EList<Sequence> sequences; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected SequencesImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return DebugSeqPackage.Literals.SEQUENCES; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<Sequence> getSequences() { if (sequences == null) { sequences = new EObjectContainmentEList<Sequence>(Sequence.class, this, DebugSeqPackage.SEQUENCES__SEQUENCES); } return sequences; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case DebugSeqPackage.SEQUENCES__SEQUENCES: return ((InternalEList<?>)getSequences()).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 DebugSeqPackage.SEQUENCES__SEQUENCES: return getSequences(); } 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 DebugSeqPackage.SEQUENCES__SEQUENCES: getSequences().clear(); getSequences().addAll((Collection<? extends Sequence>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case DebugSeqPackage.SEQUENCES__SEQUENCES: getSequences().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case DebugSeqPackage.SEQUENCES__SEQUENCES: return sequences != null && !sequences.isEmpty(); } return super.eIsSet(featureID); } } //SequencesImpl