170 lines
3.6 KiB
Java
170 lines
3.6 KiB
Java
/**
|
|
* generated by Xtext 2.23.0
|
|
*/
|
|
package fr.n7.gAME.impl;
|
|
|
|
import fr.n7.gAME.Condition;
|
|
import fr.n7.gAME.ConditionEt;
|
|
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</b></em>'.
|
|
* <!-- end-user-doc -->
|
|
* <p>
|
|
* The following features are implemented:
|
|
* </p>
|
|
* <ul>
|
|
* <li>{@link fr.n7.gAME.impl.ConditionImpl#getCondition <em>Condition</em>}</li>
|
|
* </ul>
|
|
*
|
|
* @generated
|
|
*/
|
|
public class ConditionImpl extends MinimalEObjectImpl.Container implements Condition
|
|
{
|
|
/**
|
|
* The cached value of the '{@link #getCondition() <em>Condition</em>}' containment reference list.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @see #getCondition()
|
|
* @generated
|
|
* @ordered
|
|
*/
|
|
protected EList<ConditionEt> condition;
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
protected ConditionImpl()
|
|
{
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
protected EClass eStaticClass()
|
|
{
|
|
return GAMEPackage.Literals.CONDITION;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public EList<ConditionEt> getCondition()
|
|
{
|
|
if (condition == null)
|
|
{
|
|
condition = new EObjectContainmentEList<ConditionEt>(ConditionEt.class, this, GAMEPackage.CONDITION__CONDITION);
|
|
}
|
|
return condition;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
|
{
|
|
switch (featureID)
|
|
{
|
|
case GAMEPackage.CONDITION__CONDITION:
|
|
return ((InternalEList<?>)getCondition()).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__CONDITION:
|
|
return getCondition();
|
|
}
|
|
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__CONDITION:
|
|
getCondition().clear();
|
|
getCondition().addAll((Collection<? extends ConditionEt>)newValue);
|
|
return;
|
|
}
|
|
super.eSet(featureID, newValue);
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public void eUnset(int featureID)
|
|
{
|
|
switch (featureID)
|
|
{
|
|
case GAMEPackage.CONDITION__CONDITION:
|
|
getCondition().clear();
|
|
return;
|
|
}
|
|
super.eUnset(featureID);
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public boolean eIsSet(int featureID)
|
|
{
|
|
switch (featureID)
|
|
{
|
|
case GAMEPackage.CONDITION__CONDITION:
|
|
return condition != null && !condition.isEmpty();
|
|
}
|
|
return super.eIsSet(featureID);
|
|
}
|
|
|
|
} //ConditionImpl
|