/** * generated by Xtext 2.23.0 */ package fr.n7.game.impl; import fr.n7.game.ConditionEt; import fr.n7.game.ConditionTest; import fr.n7.game.GamePackage; 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; /** * * An implementation of the model object 'Condition Et'. * *

* The following features are implemented: *

* * * @generated */ public class ConditionEtImpl extends MinimalEObjectImpl.Container implements ConditionEt { /** * The cached value of the '{@link #getConditionTest() Condition Test}' containment reference list. * * * @see #getConditionTest() * @generated * @ordered */ protected EList conditionTest; /** * * * @generated */ protected ConditionEtImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return GamePackage.Literals.CONDITION_ET; } /** * * * @generated */ @Override public EList getConditionTest() { if (conditionTest == null) { conditionTest = new EObjectContainmentEList(ConditionTest.class, this, GamePackage.CONDITION_ET__CONDITION_TEST); } return conditionTest; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case GamePackage.CONDITION_ET__CONDITION_TEST: return ((InternalEList)getConditionTest()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case GamePackage.CONDITION_ET__CONDITION_TEST: return getConditionTest(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case GamePackage.CONDITION_ET__CONDITION_TEST: getConditionTest().clear(); getConditionTest().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case GamePackage.CONDITION_ET__CONDITION_TEST: getConditionTest().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case GamePackage.CONDITION_ET__CONDITION_TEST: return conditionTest != null && !conditionTest.isEmpty(); } return super.eIsSet(featureID); } } //ConditionEtImpl