/** * MSPDI is copyright Microsoft, Inc. * Implementation wrapper in ecore done by Kestrel Technology LLC */ package net.certware.planning.mspdi.impl; import java.util.Collection; import net.certware.planning.mspdi.AssignmentType; import net.certware.planning.mspdi.AssignmentsType; import net.certware.planning.mspdi.MspdiPackage; 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.EObjectImpl; 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>Assignments Type</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.certware.planning.mspdi.impl.AssignmentsTypeImpl#getAssignment <em>Assignment</em>}</li> * </ul> * </p> * * @generated */ public class AssignmentsTypeImpl extends EObjectImpl implements AssignmentsType { /** * The cached value of the '{@link #getAssignment() <em>Assignment</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAssignment() * @generated * @ordered */ protected EList<AssignmentType> assignment; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected AssignmentsTypeImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return MspdiPackage.Literals.ASSIGNMENTS_TYPE; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<AssignmentType> getAssignment() { if (assignment == null) { assignment = new EObjectContainmentEList<AssignmentType>(AssignmentType.class, this, MspdiPackage.ASSIGNMENTS_TYPE__ASSIGNMENT); } return assignment; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case MspdiPackage.ASSIGNMENTS_TYPE__ASSIGNMENT: return ((InternalEList<?>)getAssignment()).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 MspdiPackage.ASSIGNMENTS_TYPE__ASSIGNMENT: return getAssignment(); } 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 MspdiPackage.ASSIGNMENTS_TYPE__ASSIGNMENT: getAssignment().clear(); getAssignment().addAll((Collection<? extends AssignmentType>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case MspdiPackage.ASSIGNMENTS_TYPE__ASSIGNMENT: getAssignment().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case MspdiPackage.ASSIGNMENTS_TYPE__ASSIGNMENT: return assignment != null && !assignment.isEmpty(); } return super.eIsSet(featureID); } } //AssignmentsTypeImpl