blob: 82f446b107b915bb72747cd013f31440c3e7757e [file] [log] [blame]
/**
*/
package org.hl7.fhir.impl;
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.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.hl7.fhir.FhirPackage;
import org.hl7.fhir.TestScriptAction2;
import org.hl7.fhir.TestScriptTeardown;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Test Script Teardown</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.hl7.fhir.impl.TestScriptTeardownImpl#getAction <em>Action</em>}</li>
* </ul>
*
* @generated
*/
public class TestScriptTeardownImpl extends BackboneElementImpl implements TestScriptTeardown {
/**
* The cached value of the '{@link #getAction() <em>Action</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getAction()
* @generated
* @ordered
*/
protected EList<TestScriptAction2> action;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected TestScriptTeardownImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FhirPackage.eINSTANCE.getTestScriptTeardown();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<TestScriptAction2> getAction() {
if (action == null) {
action = new EObjectContainmentEList<TestScriptAction2>(TestScriptAction2.class, this, FhirPackage.TEST_SCRIPT_TEARDOWN__ACTION);
}
return action;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FhirPackage.TEST_SCRIPT_TEARDOWN__ACTION:
return ((InternalEList<?>)getAction()).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 FhirPackage.TEST_SCRIPT_TEARDOWN__ACTION:
return getAction();
}
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 FhirPackage.TEST_SCRIPT_TEARDOWN__ACTION:
getAction().clear();
getAction().addAll((Collection<? extends TestScriptAction2>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FhirPackage.TEST_SCRIPT_TEARDOWN__ACTION:
getAction().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FhirPackage.TEST_SCRIPT_TEARDOWN__ACTION:
return action != null && !action.isEmpty();
}
return super.eIsSet(featureID);
}
} //TestScriptTeardownImpl