/**
* generated by Xtext 2.16.0
*/
package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage;
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ReliabiltiyProbability;
import java.math.BigDecimal;
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 'Reliabiltiy Probability'.
*
*
* The following features are implemented:
*
*
* - {@link hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl.ReliabiltiyProbabilityImpl#getTime Time}
*
*
* @generated
*/
public class ReliabiltiyProbabilityImpl extends ReliabilityObjectiveFunctionImpl implements ReliabiltiyProbability
{
/**
* The default value of the '{@link #getTime() Time}' attribute.
*
*
* @see #getTime()
* @generated
* @ordered
*/
protected static final BigDecimal TIME_EDEFAULT = null;
/**
* The cached value of the '{@link #getTime() Time}' attribute.
*
*
* @see #getTime()
* @generated
* @ordered
*/
protected BigDecimal time = TIME_EDEFAULT;
/**
*
*
* @generated
*/
protected ReliabiltiyProbabilityImpl()
{
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass()
{
return ApplicationConfigurationPackage.Literals.RELIABILTIY_PROBABILITY;
}
/**
*
*
* @generated
*/
@Override
public BigDecimal getTime()
{
return time;
}
/**
*
*
* @generated
*/
@Override
public void setTime(BigDecimal newTime)
{
BigDecimal oldTime = time;
time = newTime;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.RELIABILTIY_PROBABILITY__TIME, oldTime, time));
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType)
{
switch (featureID)
{
case ApplicationConfigurationPackage.RELIABILTIY_PROBABILITY__TIME:
return getTime();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case ApplicationConfigurationPackage.RELIABILTIY_PROBABILITY__TIME:
setTime((BigDecimal)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.RELIABILTIY_PROBABILITY__TIME:
setTime(TIME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case ApplicationConfigurationPackage.RELIABILTIY_PROBABILITY__TIME:
return TIME_EDEFAULT == null ? time != null : !TIME_EDEFAULT.equals(time);
}
return super.eIsSet(featureID);
}
/**
*
*
* @generated
*/
@Override
public String toString()
{
if (eIsProxy()) return super.toString();
StringBuilder result = new StringBuilder(super.toString());
result.append(" (time: ");
result.append(time);
result.append(')');
return result.toString();
}
} //ReliabiltiyProbabilityImpl