Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/EANumericalImpl.java')
-rw-r--r--extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/EANumericalImpl.java275
1 files changed, 275 insertions, 0 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/EANumericalImpl.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/EANumericalImpl.java
new file mode 100644
index 00000000000..e25aa51fadd
--- /dev/null
+++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/EANumericalImpl.java
@@ -0,0 +1,275 @@
+/**
+ */
+package org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.papyrus.eastadl.infrastructure.datatypes.DatatypesPackage;
+import org.eclipse.papyrus.eastadl.infrastructure.datatypes.EANumerical;
+import org.eclipse.papyrus.eastadl.infrastructure.datatypes.Unit;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>EA Numerical</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.EANumericalImpl#getMax <em>Max</em>}</li>
+ * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.EANumericalImpl#getMin <em>Min</em>}</li>
+ * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.EANumericalImpl#getUnit <em>Unit</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class EANumericalImpl extends EADatatypeImpl implements EANumerical {
+ /**
+ * The default value of the '{@link #getMax() <em>Max</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMax()
+ * @generated
+ * @ordered
+ */
+ protected static final Float MAX_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getMax() <em>Max</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMax()
+ * @generated
+ * @ordered
+ */
+ protected Float max = MAX_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getMin() <em>Min</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMin()
+ * @generated
+ * @ordered
+ */
+ protected static final Float MIN_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getMin() <em>Min</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMin()
+ * @generated
+ * @ordered
+ */
+ protected Float min = MIN_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getUnit() <em>Unit</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUnit()
+ * @generated
+ * @ordered
+ */
+ protected Unit unit;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EANumericalImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return DatatypesPackage.Literals.EA_NUMERICAL;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Float getMax() {
+ return max;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMax(Float newMax) {
+ Float oldMax = max;
+ max = newMax;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DatatypesPackage.EA_NUMERICAL__MAX, oldMax, max));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Float getMin() {
+ return min;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMin(Float newMin) {
+ Float oldMin = min;
+ min = newMin;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DatatypesPackage.EA_NUMERICAL__MIN, oldMin, min));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Unit getUnit() {
+ if (unit != null && unit.eIsProxy()) {
+ InternalEObject oldUnit = (InternalEObject)unit;
+ unit = (Unit)eResolveProxy(oldUnit);
+ if (unit != oldUnit) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, DatatypesPackage.EA_NUMERICAL__UNIT, oldUnit, unit));
+ }
+ }
+ return unit;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Unit basicGetUnit() {
+ return unit;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setUnit(Unit newUnit) {
+ Unit oldUnit = unit;
+ unit = newUnit;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, DatatypesPackage.EA_NUMERICAL__UNIT, oldUnit, unit));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case DatatypesPackage.EA_NUMERICAL__MAX:
+ return getMax();
+ case DatatypesPackage.EA_NUMERICAL__MIN:
+ return getMin();
+ case DatatypesPackage.EA_NUMERICAL__UNIT:
+ if (resolve) return getUnit();
+ return basicGetUnit();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case DatatypesPackage.EA_NUMERICAL__MAX:
+ setMax((Float)newValue);
+ return;
+ case DatatypesPackage.EA_NUMERICAL__MIN:
+ setMin((Float)newValue);
+ return;
+ case DatatypesPackage.EA_NUMERICAL__UNIT:
+ setUnit((Unit)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case DatatypesPackage.EA_NUMERICAL__MAX:
+ setMax(MAX_EDEFAULT);
+ return;
+ case DatatypesPackage.EA_NUMERICAL__MIN:
+ setMin(MIN_EDEFAULT);
+ return;
+ case DatatypesPackage.EA_NUMERICAL__UNIT:
+ setUnit((Unit)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case DatatypesPackage.EA_NUMERICAL__MAX:
+ return MAX_EDEFAULT == null ? max != null : !MAX_EDEFAULT.equals(max);
+ case DatatypesPackage.EA_NUMERICAL__MIN:
+ return MIN_EDEFAULT == null ? min != null : !MIN_EDEFAULT.equals(min);
+ case DatatypesPackage.EA_NUMERICAL__UNIT:
+ return unit != null;
+ }
+ 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(" (max: ");
+ result.append(max);
+ result.append(", min: ");
+ result.append(min);
+ result.append(')');
+ return result.toString();
+ }
+
+} //EANumericalImpl

Back to the top