Switch to side-by-side view

--- a
+++ b/src/main/java/genericbcm/impl/DerivedMetricsSetableImpl.java
@@ -0,0 +1,602 @@
+/**
+ */
+package genericbcm.impl;
+
+import genericbcm.DerivedMetricsSetable;
+import genericbcm.GenericbcmPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Derived Metrics Setable</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ *   <li>{@link genericbcm.impl.DerivedMetricsSetableImpl#getAvailability <em>Availability</em>}</li>
+ *   <li>{@link genericbcm.impl.DerivedMetricsSetableImpl#getRTO_QEC <em>RTO QEC</em>}</li>
+ *   <li>{@link genericbcm.impl.DerivedMetricsSetableImpl#getRPO <em>RPO</em>}</li>
+ *   <li>{@link genericbcm.impl.DerivedMetricsSetableImpl#getRTONormalPeriod <em>RTO Normal Period</em>}</li>
+ *   <li>{@link genericbcm.impl.DerivedMetricsSetableImpl#getMTO <em>MTO</em>}</li>
+ *   <li>{@link genericbcm.impl.DerivedMetricsSetableImpl#getMTPD <em>MTPD</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DerivedMetricsSetableImpl extends DerivedMetricsImpl implements DerivedMetricsSetable {
+	/**
+	 * The default value of the '{@link #getAvailability() <em>Availability</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAvailability()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final double AVAILABILITY_EDEFAULT = 1.0;
+
+	/**
+	 * The cached value of the '{@link #getAvailability() <em>Availability</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getAvailability()
+	 * @generated
+	 * @ordered
+	 */
+	protected double availability = AVAILABILITY_EDEFAULT;
+
+	/**
+	 * This is true if the Availability attribute has been set.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean availabilityESet;
+
+	/**
+	 * The default value of the '{@link #getRTO_QEC() <em>RTO QEC</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getRTO_QEC()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final double RTO_QEC_EDEFAULT = -1.0;
+
+	/**
+	 * The cached value of the '{@link #getRTO_QEC() <em>RTO QEC</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getRTO_QEC()
+	 * @generated
+	 * @ordered
+	 */
+	protected double rtO_QEC = RTO_QEC_EDEFAULT;
+
+	/**
+	 * This is true if the RTO QEC attribute has been set.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean rtO_QECESet;
+
+	/**
+	 * The default value of the '{@link #getRPO() <em>RPO</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getRPO()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final double RPO_EDEFAULT = -1.0;
+
+	/**
+	 * The cached value of the '{@link #getRPO() <em>RPO</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getRPO()
+	 * @generated
+	 * @ordered
+	 */
+	protected double rpo = RPO_EDEFAULT;
+
+	/**
+	 * This is true if the RPO attribute has been set.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean rpoESet;
+
+	/**
+	 * The default value of the '{@link #getRTONormalPeriod() <em>RTO Normal Period</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getRTONormalPeriod()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final double RTO_NORMAL_PERIOD_EDEFAULT = -1.0;
+
+	/**
+	 * The cached value of the '{@link #getRTONormalPeriod() <em>RTO Normal Period</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getRTONormalPeriod()
+	 * @generated
+	 * @ordered
+	 */
+	protected double rtoNormalPeriod = RTO_NORMAL_PERIOD_EDEFAULT;
+
+	/**
+	 * This is true if the RTO Normal Period attribute has been set.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean rtoNormalPeriodESet;
+
+	/**
+	 * The default value of the '{@link #getMTO() <em>MTO</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMTO()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final double MTO_EDEFAULT = -1.0;
+
+	/**
+	 * The cached value of the '{@link #getMTO() <em>MTO</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMTO()
+	 * @generated
+	 * @ordered
+	 */
+	protected double mto = MTO_EDEFAULT;
+
+	/**
+	 * The default value of the '{@link #getMTPD() <em>MTPD</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMTPD()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final double MTPD_EDEFAULT = -1.0;
+
+	/**
+	 * The cached value of the '{@link #getMTPD() <em>MTPD</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getMTPD()
+	 * @generated
+	 * @ordered
+	 */
+	protected double mtpd = MTPD_EDEFAULT;
+
+	/**
+	 * This is true if the MTPD attribute has been set.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 * @ordered
+	 */
+	protected boolean mtpdESet;
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected DerivedMetricsSetableImpl() {
+		super();
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	protected EClass eStaticClass() {
+		return GenericbcmPackage.Literals.DERIVED_METRICS_SETABLE;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public double getAvailability() {
+		return availability;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setAvailability(double newAvailability) {
+		double oldAvailability = availability;
+		availability = newAvailability;
+		boolean oldAvailabilityESet = availabilityESet;
+		availabilityESet = true;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.DERIVED_METRICS_SETABLE__AVAILABILITY, oldAvailability, availability, !oldAvailabilityESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void unsetAvailability() {
+		double oldAvailability = availability;
+		boolean oldAvailabilityESet = availabilityESet;
+		availability = AVAILABILITY_EDEFAULT;
+		availabilityESet = false;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET, GenericbcmPackage.DERIVED_METRICS_SETABLE__AVAILABILITY, oldAvailability, AVAILABILITY_EDEFAULT, oldAvailabilityESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isSetAvailability() {
+		return availabilityESet;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public double getRTO_QEC() {
+		return rtO_QEC;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setRTO_QEC(double newRTO_QEC) {
+		double oldRTO_QEC = rtO_QEC;
+		rtO_QEC = newRTO_QEC;
+		boolean oldRTO_QECESet = rtO_QECESet;
+		rtO_QECESet = true;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_QEC, oldRTO_QEC, rtO_QEC, !oldRTO_QECESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void unsetRTO_QEC() {
+		double oldRTO_QEC = rtO_QEC;
+		boolean oldRTO_QECESet = rtO_QECESet;
+		rtO_QEC = RTO_QEC_EDEFAULT;
+		rtO_QECESet = false;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET, GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_QEC, oldRTO_QEC, RTO_QEC_EDEFAULT, oldRTO_QECESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isSetRTO_QEC() {
+		return rtO_QECESet;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public double getRPO() {
+		return rpo;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setRPO(double newRPO) {
+		double oldRPO = rpo;
+		rpo = newRPO;
+		boolean oldRPOESet = rpoESet;
+		rpoESet = true;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.DERIVED_METRICS_SETABLE__RPO, oldRPO, rpo, !oldRPOESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void unsetRPO() {
+		double oldRPO = rpo;
+		boolean oldRPOESet = rpoESet;
+		rpo = RPO_EDEFAULT;
+		rpoESet = false;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET, GenericbcmPackage.DERIVED_METRICS_SETABLE__RPO, oldRPO, RPO_EDEFAULT, oldRPOESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isSetRPO() {
+		return rpoESet;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public double getRTONormalPeriod() {
+		return rtoNormalPeriod;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setRTONormalPeriod(double newRTONormalPeriod) {
+		double oldRTONormalPeriod = rtoNormalPeriod;
+		rtoNormalPeriod = newRTONormalPeriod;
+		boolean oldRTONormalPeriodESet = rtoNormalPeriodESet;
+		rtoNormalPeriodESet = true;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_NORMAL_PERIOD, oldRTONormalPeriod, rtoNormalPeriod, !oldRTONormalPeriodESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void unsetRTONormalPeriod() {
+		double oldRTONormalPeriod = rtoNormalPeriod;
+		boolean oldRTONormalPeriodESet = rtoNormalPeriodESet;
+		rtoNormalPeriod = RTO_NORMAL_PERIOD_EDEFAULT;
+		rtoNormalPeriodESet = false;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET, GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_NORMAL_PERIOD, oldRTONormalPeriod, RTO_NORMAL_PERIOD_EDEFAULT, oldRTONormalPeriodESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isSetRTONormalPeriod() {
+		return rtoNormalPeriodESet;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public double getMTO() {
+		return mto;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setMTO(double newMTO) {
+		double oldMTO = mto;
+		mto = newMTO;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.DERIVED_METRICS_SETABLE__MTO, oldMTO, mto));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public double getMTPD() {
+		return mtpd;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setMTPD(double newMTPD) {
+		double oldMTPD = mtpd;
+		mtpd = newMTPD;
+		boolean oldMTPDESet = mtpdESet;
+		mtpdESet = true;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.DERIVED_METRICS_SETABLE__MTPD, oldMTPD, mtpd, !oldMTPDESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void unsetMTPD() {
+		double oldMTPD = mtpd;
+		boolean oldMTPDESet = mtpdESet;
+		mtpd = MTPD_EDEFAULT;
+		mtpdESet = false;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.UNSET, GenericbcmPackage.DERIVED_METRICS_SETABLE__MTPD, oldMTPD, MTPD_EDEFAULT, oldMTPDESet));
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public boolean isSetMTPD() {
+		return mtpdESet;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public Object eGet(int featureID, boolean resolve, boolean coreType) {
+		switch (featureID) {
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__AVAILABILITY:
+				return getAvailability();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_QEC:
+				return getRTO_QEC();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RPO:
+				return getRPO();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_NORMAL_PERIOD:
+				return getRTONormalPeriod();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__MTO:
+				return getMTO();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__MTPD:
+				return getMTPD();
+		}
+		return super.eGet(featureID, resolve, coreType);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eSet(int featureID, Object newValue) {
+		switch (featureID) {
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__AVAILABILITY:
+				setAvailability((Double)newValue);
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_QEC:
+				setRTO_QEC((Double)newValue);
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RPO:
+				setRPO((Double)newValue);
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_NORMAL_PERIOD:
+				setRTONormalPeriod((Double)newValue);
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__MTO:
+				setMTO((Double)newValue);
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__MTPD:
+				setMTPD((Double)newValue);
+				return;
+		}
+		super.eSet(featureID, newValue);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public void eUnset(int featureID) {
+		switch (featureID) {
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__AVAILABILITY:
+				unsetAvailability();
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_QEC:
+				unsetRTO_QEC();
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RPO:
+				unsetRPO();
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_NORMAL_PERIOD:
+				unsetRTONormalPeriod();
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__MTO:
+				setMTO(MTO_EDEFAULT);
+				return;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__MTPD:
+				unsetMTPD();
+				return;
+		}
+		super.eUnset(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public boolean eIsSet(int featureID) {
+		switch (featureID) {
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__AVAILABILITY:
+				return isSetAvailability();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_QEC:
+				return isSetRTO_QEC();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RPO:
+				return isSetRPO();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__RTO_NORMAL_PERIOD:
+				return isSetRTONormalPeriod();
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__MTO:
+				return mto != MTO_EDEFAULT;
+			case GenericbcmPackage.DERIVED_METRICS_SETABLE__MTPD:
+				return isSetMTPD();
+		}
+		return super.eIsSet(featureID);
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString() {
+		if (eIsProxy()) return super.toString();
+
+		StringBuffer result = new StringBuffer(super.toString());
+		result.append(" (Availability: ");
+		if (availabilityESet) result.append(availability); else result.append("<unset>");
+		result.append(", RTO_QEC: ");
+		if (rtO_QECESet) result.append(rtO_QEC); else result.append("<unset>");
+		result.append(", RPO: ");
+		if (rpoESet) result.append(rpo); else result.append("<unset>");
+		result.append(", RTONormalPeriod: ");
+		if (rtoNormalPeriodESet) result.append(rtoNormalPeriod); else result.append("<unset>");
+		result.append(", MTO: ");
+		result.append(mto);
+		result.append(", MTPD: ");
+		if (mtpdESet) result.append(mtpd); else result.append("<unset>");
+		result.append(')');
+		return result.toString();
+	}
+
+} //DerivedMetricsSetableImpl