projet-genie-logiciel-systeme/workspace/fr.n7.game/src-gen/fr/n7/gAME/impl/ConditionObjetImpl.java

296 lines
6.8 KiB
Java
Raw Normal View History

2021-11-30 17:25:45 +00:00
/**
* generated by Xtext 2.23.0
*/
2021-12-03 08:38:29 +00:00
package fr.n7.gAME.impl;
2021-12-03 07:37:31 +00:00
2021-12-03 08:38:29 +00:00
import fr.n7.gAME.ConditionObjet;
import fr.n7.gAME.GAMEPackage;
2021-11-30 17:25:45 +00:00
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Condition Objet</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
2021-12-03 08:38:29 +00:00
* <li>{@link fr.n7.gAME.impl.ConditionObjetImpl#getObjet <em>Objet</em>}</li>
* <li>{@link fr.n7.gAME.impl.ConditionObjetImpl#getComparateur <em>Comparateur</em>}</li>
* <li>{@link fr.n7.gAME.impl.ConditionObjetImpl#getNombre <em>Nombre</em>}</li>
2021-11-30 17:25:45 +00:00
* </ul>
*
* @generated
*/
public class ConditionObjetImpl extends ConditionTestImpl implements ConditionObjet
{
/**
* The default value of the '{@link #getObjet() <em>Objet</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getObjet()
* @generated
* @ordered
*/
protected static final String OBJET_EDEFAULT = null;
/**
* The cached value of the '{@link #getObjet() <em>Objet</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getObjet()
* @generated
* @ordered
*/
protected String objet = OBJET_EDEFAULT;
/**
* The default value of the '{@link #getComparateur() <em>Comparateur</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getComparateur()
* @generated
* @ordered
*/
protected static final String COMPARATEUR_EDEFAULT = null;
/**
* The cached value of the '{@link #getComparateur() <em>Comparateur</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getComparateur()
* @generated
* @ordered
*/
protected String comparateur = COMPARATEUR_EDEFAULT;
/**
* The default value of the '{@link #getNombre() <em>Nombre</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNombre()
* @generated
* @ordered
*/
protected static final int NOMBRE_EDEFAULT = 0;
/**
* The cached value of the '{@link #getNombre() <em>Nombre</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNombre()
* @generated
* @ordered
*/
protected int nombre = NOMBRE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ConditionObjetImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
2021-12-03 08:38:29 +00:00
return GAMEPackage.Literals.CONDITION_OBJET;
2021-11-30 17:25:45 +00:00
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getObjet()
{
return objet;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setObjet(String newObjet)
{
String oldObjet = objet;
objet = newObjet;
if (eNotificationRequired())
2021-12-03 08:38:29 +00:00
eNotify(new ENotificationImpl(this, Notification.SET, GAMEPackage.CONDITION_OBJET__OBJET, oldObjet, objet));
2021-11-30 17:25:45 +00:00
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getComparateur()
{
return comparateur;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setComparateur(String newComparateur)
{
String oldComparateur = comparateur;
comparateur = newComparateur;
if (eNotificationRequired())
2021-12-03 08:38:29 +00:00
eNotify(new ENotificationImpl(this, Notification.SET, GAMEPackage.CONDITION_OBJET__COMPARATEUR, oldComparateur, comparateur));
2021-11-30 17:25:45 +00:00
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int getNombre()
{
return nombre;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setNombre(int newNombre)
{
int oldNombre = nombre;
nombre = newNombre;
if (eNotificationRequired())
2021-12-03 08:38:29 +00:00
eNotify(new ENotificationImpl(this, Notification.SET, GAMEPackage.CONDITION_OBJET__NOMBRE, oldNombre, nombre));
2021-11-30 17:25:45 +00:00
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__OBJET:
2021-11-30 17:25:45 +00:00
return getObjet();
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__COMPARATEUR:
2021-11-30 17:25:45 +00:00
return getComparateur();
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__NOMBRE:
2021-11-30 17:25:45 +00:00
return getNombre();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__OBJET:
2021-11-30 17:25:45 +00:00
setObjet((String)newValue);
return;
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__COMPARATEUR:
2021-11-30 17:25:45 +00:00
setComparateur((String)newValue);
return;
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__NOMBRE:
2021-11-30 17:25:45 +00:00
setNombre((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__OBJET:
2021-11-30 17:25:45 +00:00
setObjet(OBJET_EDEFAULT);
return;
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__COMPARATEUR:
2021-11-30 17:25:45 +00:00
setComparateur(COMPARATEUR_EDEFAULT);
return;
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__NOMBRE:
2021-11-30 17:25:45 +00:00
setNombre(NOMBRE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__OBJET:
2021-11-30 17:25:45 +00:00
return OBJET_EDEFAULT == null ? objet != null : !OBJET_EDEFAULT.equals(objet);
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__COMPARATEUR:
2021-11-30 17:25:45 +00:00
return COMPARATEUR_EDEFAULT == null ? comparateur != null : !COMPARATEUR_EDEFAULT.equals(comparateur);
2021-12-03 08:38:29 +00:00
case GAMEPackage.CONDITION_OBJET__NOMBRE:
2021-11-30 17:25:45 +00:00
return nombre != NOMBRE_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (objet: ");
result.append(objet);
result.append(", comparateur: ");
result.append(comparateur);
result.append(", nombre: ");
result.append(nombre);
result.append(')');
return result.toString();
}
} //ConditionObjetImpl