/**
*/
package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate;
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'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.KOfMGateImpl#getK K}
*
*
* @generated
*/
public class KOfMGateImpl extends GateImpl implements KOfMGate {
/**
* 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;
/**
*
*
* @generated
*/
protected KOfMGateImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return FtPackage.Literals.KOF_MGATE;
}
/**
*
*
* @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, FtPackage.KOF_MGATE__K, oldK, k));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FtPackage.KOF_MGATE__K:
return getK();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FtPackage.KOF_MGATE__K:
setK((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FtPackage.KOF_MGATE__K:
setK(K_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FtPackage.KOF_MGATE__K:
return k != K_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(')');
return result.toString();
}
} //KOfMGateImpl