/**
*/
package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
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 'Constant Event'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantEventImpl#isFailed Failed}
*
*
* @generated
*/
public class ConstantEventImpl extends EventImpl implements ConstantEvent {
/**
* The default value of the '{@link #isFailed() Failed}' attribute.
*
*
* @see #isFailed()
* @generated
* @ordered
*/
protected static final boolean FAILED_EDEFAULT = false;
/**
* The cached value of the '{@link #isFailed() Failed}' attribute.
*
*
* @see #isFailed()
* @generated
* @ordered
*/
protected boolean failed = FAILED_EDEFAULT;
/**
*
*
* @generated
*/
protected ConstantEventImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return FtPackage.Literals.CONSTANT_EVENT;
}
/**
*
*
* @generated
*/
@Override
public boolean isFailed() {
return failed;
}
/**
*
*
* @generated
*/
@Override
public void setFailed(boolean newFailed) {
boolean oldFailed = failed;
failed = newFailed;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.CONSTANT_EVENT__FAILED, oldFailed, failed));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FtPackage.CONSTANT_EVENT__FAILED:
return isFailed();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FtPackage.CONSTANT_EVENT__FAILED:
setFailed((Boolean)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FtPackage.CONSTANT_EVENT__FAILED:
setFailed(FAILED_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FtPackage.CONSTANT_EVENT__FAILED:
return failed != FAILED_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (failed: ");
result.append(failed);
result.append(')');
return result.toString();
}
} //ConstantEventImpl