170 lines
3.7 KiB
Java
170 lines
3.7 KiB
Java
/**
|
|
* 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;
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* An implementation of the model object '<em><b>Condition Et</b></em>'.
|
|
* <!-- end-user-doc -->
|
|
* <p>
|
|
* The following features are implemented:
|
|
* </p>
|
|
* <ul>
|
|
* <li>{@link fr.n7.gAME.impl.ConditionEtImpl#getConditionTest <em>Condition Test</em>}</li>
|
|
* </ul>
|
|
*
|
|
* @generated
|
|
*/
|
|
public class ConditionEtImpl extends MinimalEObjectImpl.Container implements ConditionEt
|
|
{
|
|
/**
|
|
* The cached value of the '{@link #getConditionTest() <em>Condition Test</em>}' containment reference list.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @see #getConditionTest()
|
|
* @generated
|
|
* @ordered
|
|
*/
|
|
protected EList<ConditionTest> conditionTest;
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
protected ConditionEtImpl()
|
|
{
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
protected EClass eStaticClass()
|
|
{
|
|
return GAMEPackage.Literals.CONDITION_ET;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public EList<ConditionTest> getConditionTest()
|
|
{
|
|
if (conditionTest == null)
|
|
{
|
|
conditionTest = new EObjectContainmentEList<ConditionTest>(ConditionTest.class, this, GAMEPackage.CONDITION_ET__CONDITION_TEST);
|
|
}
|
|
return conditionTest;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @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);
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @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);
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@SuppressWarnings("unchecked")
|
|
@Override
|
|
public void eSet(int featureID, Object newValue)
|
|
{
|
|
switch (featureID)
|
|
{
|
|
case GAMEPackage.CONDITION_ET__CONDITION_TEST:
|
|
getConditionTest().clear();
|
|
getConditionTest().addAll((Collection<? extends ConditionTest>)newValue);
|
|
return;
|
|
}
|
|
super.eSet(featureID, newValue);
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public void eUnset(int featureID)
|
|
{
|
|
switch (featureID)
|
|
{
|
|
case GAMEPackage.CONDITION_ET__CONDITION_TEST:
|
|
getConditionTest().clear();
|
|
return;
|
|
}
|
|
super.eUnset(featureID);
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @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
|