diff options
Diffstat (limited to 'extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/RangeableValueTypeImpl.java')
-rw-r--r-- | extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/RangeableValueTypeImpl.java | 150 |
1 files changed, 95 insertions, 55 deletions
diff --git a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/RangeableValueTypeImpl.java b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/RangeableValueTypeImpl.java index 2ce4f94755f..ef984ec4511 100644 --- a/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/RangeableValueTypeImpl.java +++ b/extraplugins/eastadl/org.eclipse.papyrus.eastadl/src/org/eclipse/papyrus/eastadl/infrastructure/datatypes/impl/RangeableValueTypeImpl.java @@ -1,7 +1,7 @@ /***************************************************************************** * Copyright (c) 2010 CEA LIST. * - * + * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -31,10 +31,10 @@ import org.eclipse.papyrus.eastadl.infrastructure.datatypes.RangeableValueType; * <p> * The following features are implemented: * <ul> - * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.RangeableValueTypeImpl#getAccuracy <em>Accuracy</em>}</li> - * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.RangeableValueTypeImpl#getResolution <em>Resolution</em>}</li> - * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.RangeableValueTypeImpl#getSignificantDigits <em>Significant Digits</em>}</li> - * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.RangeableValueTypeImpl#getBaseRangeable <em>Base Rangeable</em>}</li> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.RangeableValueTypeImpl#getAccuracy <em>Accuracy</em>}</li> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.RangeableValueTypeImpl#getResolution <em>Resolution</em>}</li> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.RangeableValueTypeImpl#getSignificantDigits <em>Significant Digits</em>}</li> + * <li>{@link org.eclipse.papyrus.eastadl.infrastructure.datatypes.impl.RangeableValueTypeImpl#getBaseRangeable <em>Base Rangeable</em>}</li> * </ul> * </p> * @@ -45,6 +45,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV * The default value of the '{@link #getAccuracy() <em>Accuracy</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getAccuracy() * @generated * @ordered @@ -55,6 +56,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV * The cached value of the '{@link #getAccuracy() <em>Accuracy</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getAccuracy() * @generated * @ordered @@ -65,6 +67,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV * The default value of the '{@link #getResolution() <em>Resolution</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getResolution() * @generated * @ordered @@ -75,6 +78,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV * The cached value of the '{@link #getResolution() <em>Resolution</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getResolution() * @generated * @ordered @@ -85,6 +89,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV * The default value of the '{@link #getSignificantDigits() <em>Significant Digits</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getSignificantDigits() * @generated * @ordered @@ -95,6 +100,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV * The cached value of the '{@link #getSignificantDigits() <em>Significant Digits</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getSignificantDigits() * @generated * @ordered @@ -105,6 +111,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV * The cached value of the '{@link #getBaseRangeable() <em>Base Rangeable</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @see #getBaseRangeable() * @generated * @ordered @@ -114,6 +121,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ protected RangeableValueTypeImpl() { @@ -123,20 +131,23 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { - case DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY: - return getAccuracy(); - case DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION: - return getResolution(); - case DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS: - return getSignificantDigits(); - case DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE: - if (resolve) return getBaseRangeable(); - return basicGetBaseRangeable(); + case DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY: + return getAccuracy(); + case DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION: + return getResolution(); + case DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS: + return getSignificantDigits(); + case DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE: + if (resolve) { + return getBaseRangeable(); + } + return basicGetBaseRangeable(); } return super.eGet(featureID, resolve, coreType); } @@ -144,19 +155,20 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { - case DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY: - return ACCURACY_EDEFAULT == null ? accuracy != null : !ACCURACY_EDEFAULT.equals(accuracy); - case DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION: - return RESOLUTION_EDEFAULT == null ? resolution != null : !RESOLUTION_EDEFAULT.equals(resolution); - case DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS: - return significantDigits != SIGNIFICANT_DIGITS_EDEFAULT; - case DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE: - return baseRangeable != null; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY: + return ACCURACY_EDEFAULT == null ? accuracy != null : !ACCURACY_EDEFAULT.equals(accuracy); + case DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION: + return RESOLUTION_EDEFAULT == null ? resolution != null : !RESOLUTION_EDEFAULT.equals(resolution); + case DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS: + return significantDigits != SIGNIFICANT_DIGITS_EDEFAULT; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE: + return baseRangeable != null; } return super.eIsSet(featureID); } @@ -164,23 +176,24 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { - case DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY: - setAccuracy((Float)newValue); - return; - case DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION: - setResolution((Float)newValue); - return; - case DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS: - setSignificantDigits((Integer)newValue); - return; - case DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE: - setBaseRangeable((EANumerical)newValue); - return; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY: + setAccuracy((Float) newValue); + return; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION: + setResolution((Float) newValue); + return; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS: + setSignificantDigits((Integer) newValue); + return; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE: + setBaseRangeable((EANumerical) newValue); + return; } super.eSet(featureID, newValue); } @@ -188,6 +201,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override @@ -198,23 +212,24 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { - case DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY: - setAccuracy(ACCURACY_EDEFAULT); - return; - case DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION: - setResolution(RESOLUTION_EDEFAULT); - return; - case DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS: - setSignificantDigits(SIGNIFICANT_DIGITS_EDEFAULT); - return; - case DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE: - setBaseRangeable((EANumerical)null); - return; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY: + setAccuracy(ACCURACY_EDEFAULT); + return; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION: + setResolution(RESOLUTION_EDEFAULT); + return; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS: + setSignificantDigits(SIGNIFICANT_DIGITS_EDEFAULT); + return; + case DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE: + setBaseRangeable((EANumerical) null); + return; } super.eUnset(featureID); } @@ -222,8 +237,10 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public Float getAccuracy() { return accuracy; } @@ -231,8 +248,10 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public Float getResolution() { return resolution; } @@ -240,8 +259,10 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public int getSignificantDigits() { return significantDigits; } @@ -249,51 +270,63 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public void setAccuracy(Float newAccuracy) { Float oldAccuracy = accuracy; accuracy = newAccuracy; - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, DatatypesPackage.RANGEABLE_VALUE_TYPE__ACCURACY, oldAccuracy, accuracy)); + } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public void setResolution(Float newResolution) { Float oldResolution = resolution; resolution = newResolution; - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, DatatypesPackage.RANGEABLE_VALUE_TYPE__RESOLUTION, oldResolution, resolution)); + } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public void setSignificantDigits(int newSignificantDigits) { int oldSignificantDigits = significantDigits; significantDigits = newSignificantDigits; - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, DatatypesPackage.RANGEABLE_VALUE_TYPE__SIGNIFICANT_DIGITS, oldSignificantDigits, significantDigits)); + } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public EANumerical getBaseRangeable() { if (baseRangeable != null && baseRangeable.eIsProxy()) { - InternalEObject oldBaseRangeable = (InternalEObject)baseRangeable; - baseRangeable = (EANumerical)eResolveProxy(oldBaseRangeable); + InternalEObject oldBaseRangeable = (InternalEObject) baseRangeable; + baseRangeable = (EANumerical) eResolveProxy(oldBaseRangeable); if (baseRangeable != oldBaseRangeable) { - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.RESOLVE, DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE, oldBaseRangeable, baseRangeable)); + } } } return baseRangeable; @@ -302,6 +335,7 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public EANumerical basicGetBaseRangeable() { @@ -311,23 +345,29 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ + @Override public void setBaseRangeable(EANumerical newBaseRangeable) { EANumerical oldBaseRangeable = baseRangeable; baseRangeable = newBaseRangeable; - if (eNotificationRequired()) + if (eNotificationRequired()) { eNotify(new ENotificationImpl(this, Notification.SET, DatatypesPackage.RANGEABLE_VALUE_TYPE__BASE_RANGEABLE, oldBaseRangeable, baseRangeable)); + } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ @Override public String toString() { - if (eIsProxy()) return super.toString(); + if (eIsProxy()) { + return super.toString(); + } StringBuffer result = new StringBuffer(super.toString()); result.append(" (accuracy: "); @@ -340,4 +380,4 @@ public class RangeableValueTypeImpl extends EADatatypeImpl implements RangeableV return result.toString(); } -} //RangeableValueTypeImpl +} // RangeableValueTypeImpl |