From 615b602f0a9b4ce9eca8c38b9aa780b81d03d8e7 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 6 Feb 2019 18:28:18 +0100 Subject: Extract component fault tree model --- .../model/ft/impl/ConstantDistributionImpl.java | 164 +++++++++++++++++++++ 1 file changed, 164 insertions(+) create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantDistributionImpl.java (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantDistributionImpl.java') diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantDistributionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantDistributionImpl.java new file mode 100644 index 00000000..7f85ed32 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantDistributionImpl.java @@ -0,0 +1,164 @@ +/** + */ +package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl; + +import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantDistribution; +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 Distribution'. + * + *

+ * The following features are implemented: + *

+ * + * + * @generated + */ +public class ConstantDistributionImpl extends DistributionImpl implements ConstantDistribution { + /** + * The default value of the '{@link #getP() P}' attribute. + * + * + * @see #getP() + * @generated + * @ordered + */ + protected static final double P_EDEFAULT = 0.0; + + /** + * The cached value of the '{@link #getP() P}' attribute. + * + * + * @see #getP() + * @generated + * @ordered + */ + protected double p = P_EDEFAULT; + + /** + * + * + * @generated + */ + protected ConstantDistributionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return FtPackage.Literals.CONSTANT_DISTRIBUTION; + } + + /** + * + * + * @generated + */ + @Override + public double getP() { + return p; + } + + /** + * + * + * @generated + */ + @Override + public void setP(double newP) { + double oldP = p; + p = newP; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.CONSTANT_DISTRIBUTION__P, oldP, p)); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case FtPackage.CONSTANT_DISTRIBUTION__P: + return getP(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case FtPackage.CONSTANT_DISTRIBUTION__P: + setP((Double)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case FtPackage.CONSTANT_DISTRIBUTION__P: + setP(P_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case FtPackage.CONSTANT_DISTRIBUTION__P: + return p != P_EDEFAULT; + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (p: "); + result.append(p); + result.append(')'); + return result.toString(); + } + +} //ConstantDistributionImpl -- cgit v1.2.3-70-g09d2