/** */ package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl; import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ExponentialDistribution; 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 'Exponential Distribution'. * *

* The following features are implemented: *

* * * @generated */ public class ExponentialDistributionImpl extends DistributionImpl implements ExponentialDistribution { /** * The default value of the '{@link #getLambda() Lambda}' attribute. * * * @see #getLambda() * @generated * @ordered */ protected static final double LAMBDA_EDEFAULT = 0.0; /** * The cached value of the '{@link #getLambda() Lambda}' attribute. * * * @see #getLambda() * @generated * @ordered */ protected double lambda = LAMBDA_EDEFAULT; /** * * * @generated */ protected ExponentialDistributionImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return FtPackage.Literals.EXPONENTIAL_DISTRIBUTION; } /** * * * @generated */ @Override public double getLambda() { return lambda; } /** * * * @generated */ @Override public void setLambda(double newLambda) { double oldLambda = lambda; lambda = newLambda; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.EXPONENTIAL_DISTRIBUTION__LAMBDA, oldLambda, lambda)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case FtPackage.EXPONENTIAL_DISTRIBUTION__LAMBDA: return getLambda(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case FtPackage.EXPONENTIAL_DISTRIBUTION__LAMBDA: setLambda((Double)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case FtPackage.EXPONENTIAL_DISTRIBUTION__LAMBDA: setLambda(LAMBDA_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case FtPackage.EXPONENTIAL_DISTRIBUTION__LAMBDA: return lambda != LAMBDA_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (lambda: "); result.append(lambda); result.append(')'); return result.toString(); } } //ExponentialDistributionImpl