/** */ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; /** * * An implementation of the model object 'KOf MGate Definition'. * *

* The following features are implemented: *

* * * @generated */ public class KOfMGateDefinitionImpl extends GateDefinitionImpl implements KOfMGateDefinition { /** * The default value of the '{@link #getK() K}' attribute. * * * @see #getK() * @generated * @ordered */ protected static final int K_EDEFAULT = 0; /** * The cached value of the '{@link #getK() K}' attribute. * * * @see #getK() * @generated * @ordered */ protected int k = K_EDEFAULT; /** * The default value of the '{@link #getM() M}' attribute. * * * @see #getM() * @generated * @ordered */ protected static final int M_EDEFAULT = 0; /** * The cached value of the '{@link #getM() M}' attribute. * * * @see #getM() * @generated * @ordered */ protected int m = M_EDEFAULT; /** * * * @generated */ protected KOfMGateDefinitionImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return CftPackage.Literals.KOF_MGATE_DEFINITION; } /** * * * @generated */ @Override public int getK() { return k; } /** * * * @generated */ @Override public void setK(int newK) { int oldK = k; k = newK; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.KOF_MGATE_DEFINITION__K, oldK, k)); } /** * * * @generated */ @Override public int getM() { return m; } /** * * * @generated */ @Override public void setM(int newM) { int oldM = m; m = newM; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.KOF_MGATE_DEFINITION__M, oldM, m)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case CftPackage.KOF_MGATE_DEFINITION__K: return getK(); case CftPackage.KOF_MGATE_DEFINITION__M: return getM(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case CftPackage.KOF_MGATE_DEFINITION__K: setK((Integer)newValue); return; case CftPackage.KOF_MGATE_DEFINITION__M: setM((Integer)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case CftPackage.KOF_MGATE_DEFINITION__K: setK(K_EDEFAULT); return; case CftPackage.KOF_MGATE_DEFINITION__M: setM(M_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case CftPackage.KOF_MGATE_DEFINITION__K: return k != K_EDEFAULT; case CftPackage.KOF_MGATE_DEFINITION__M: return m != M_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (k: "); result.append(k); result.append(", m: "); result.append(m); result.append(')'); return result.toString(); } } //KOfMGateDefinitionImpl