projet-genie-logiciel-systeme/workspace/fr.n7.game/src-gen/fr/n7/game/impl/ConditionObjetImpl.java
2021-12-03 08:37:31 +01:00

296 lines
6.8 KiB
Java

/**
* generated by Xtext 2.23.0
*/
package fr.n7.game.impl;
import fr.n7.game.ConditionObjet;
import fr.n7.game.GamePackage;
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>
* <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>
* </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()
{
return GamePackage.Literals.CONDITION_OBJET;
}
/**
* <!-- 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())
eNotify(new ENotificationImpl(this, Notification.SET, GamePackage.CONDITION_OBJET__OBJET, oldObjet, objet));
}
/**
* <!-- 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())
eNotify(new ENotificationImpl(this, Notification.SET, GamePackage.CONDITION_OBJET__COMPARATEUR, oldComparateur, comparateur));
}
/**
* <!-- 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())
eNotify(new ENotificationImpl(this, Notification.SET, GamePackage.CONDITION_OBJET__NOMBRE, oldNombre, nombre));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case GamePackage.CONDITION_OBJET__OBJET:
return getObjet();
case GamePackage.CONDITION_OBJET__COMPARATEUR:
return getComparateur();
case GamePackage.CONDITION_OBJET__NOMBRE:
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)
{
case GamePackage.CONDITION_OBJET__OBJET:
setObjet((String)newValue);
return;
case GamePackage.CONDITION_OBJET__COMPARATEUR:
setComparateur((String)newValue);
return;
case GamePackage.CONDITION_OBJET__NOMBRE:
setNombre((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case GamePackage.CONDITION_OBJET__OBJET:
setObjet(OBJET_EDEFAULT);
return;
case GamePackage.CONDITION_OBJET__COMPARATEUR:
setComparateur(COMPARATEUR_EDEFAULT);
return;
case GamePackage.CONDITION_OBJET__NOMBRE:
setNombre(NOMBRE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case GamePackage.CONDITION_OBJET__OBJET:
return OBJET_EDEFAULT == null ? objet != null : !OBJET_EDEFAULT.equals(objet);
case GamePackage.CONDITION_OBJET__COMPARATEUR:
return COMPARATEUR_EDEFAULT == null ? comparateur != null : !COMPARATEUR_EDEFAULT.equals(comparateur);
case GamePackage.CONDITION_OBJET__NOMBRE:
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