All Downloads are FREE. Search and download functionalities are using the official Maven repository.

BusinessDomainDsl.impl.DecimalPropertyImpl Maven / Gradle / Ivy

The newest version!
/**
 * 
 * 
 *
 * $Id$
 */
package BusinessDomainDsl.impl;

import BusinessDomainDsl.BusinessDomainDslPackage;
import BusinessDomainDsl.DecimalProperty;

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 'Decimal Property'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link BusinessDomainDsl.impl.DecimalPropertyImpl#getMinValue Min Value}
  • *
  • {@link BusinessDomainDsl.impl.DecimalPropertyImpl#getMaxValue Max Value}
  • *
  • {@link BusinessDomainDsl.impl.DecimalPropertyImpl#isMinInclusive Min Inclusive}
  • *
  • {@link BusinessDomainDsl.impl.DecimalPropertyImpl#isMaxInclusive Max Inclusive}
  • *
  • {@link BusinessDomainDsl.impl.DecimalPropertyImpl#getDefaultValue Default Value}
  • *
*

* * @generated */ public class DecimalPropertyImpl extends PropertyImpl implements DecimalProperty { /** * The default value of the '{@link #getMinValue() Min Value}' attribute. * * * @see #getMinValue() * @generated * @ordered */ protected static final float MIN_VALUE_EDEFAULT = -2.14748365E9F; /** * The cached value of the '{@link #getMinValue() Min Value}' attribute. * * * @see #getMinValue() * @generated * @ordered */ protected float minValue = MIN_VALUE_EDEFAULT; /** * The default value of the '{@link #getMaxValue() Max Value}' attribute. * * * @see #getMaxValue() * @generated * @ordered */ protected static final float MAX_VALUE_EDEFAULT = -2.14748365E9F; /** * The cached value of the '{@link #getMaxValue() Max Value}' attribute. * * * @see #getMaxValue() * @generated * @ordered */ protected float maxValue = MAX_VALUE_EDEFAULT; /** * The default value of the '{@link #isMinInclusive() Min Inclusive}' attribute. * * * @see #isMinInclusive() * @generated * @ordered */ protected static final boolean MIN_INCLUSIVE_EDEFAULT = true; /** * The cached value of the '{@link #isMinInclusive() Min Inclusive}' attribute. * * * @see #isMinInclusive() * @generated * @ordered */ protected boolean minInclusive = MIN_INCLUSIVE_EDEFAULT; /** * The default value of the '{@link #isMaxInclusive() Max Inclusive}' attribute. * * * @see #isMaxInclusive() * @generated * @ordered */ protected static final boolean MAX_INCLUSIVE_EDEFAULT = true; /** * The cached value of the '{@link #isMaxInclusive() Max Inclusive}' attribute. * * * @see #isMaxInclusive() * @generated * @ordered */ protected boolean maxInclusive = MAX_INCLUSIVE_EDEFAULT; /** * The default value of the '{@link #getDefaultValue() Default Value}' attribute. * * * @see #getDefaultValue() * @generated * @ordered */ protected static final float DEFAULT_VALUE_EDEFAULT = 0.0F; /** * The cached value of the '{@link #getDefaultValue() Default Value}' attribute. * * * @see #getDefaultValue() * @generated * @ordered */ protected float defaultValue = DEFAULT_VALUE_EDEFAULT; /** * * * @generated */ protected DecimalPropertyImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return BusinessDomainDslPackage.Literals.DECIMAL_PROPERTY; } /** * * * @generated */ public float getMinValue() { return minValue; } /** * * * @generated */ public void setMinValue(float newMinValue) { float oldMinValue = minValue; minValue = newMinValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_VALUE, oldMinValue, minValue)); } /** * * * @generated */ public float getMaxValue() { return maxValue; } /** * * * @generated */ public void setMaxValue(float newMaxValue) { float oldMaxValue = maxValue; maxValue = newMaxValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_VALUE, oldMaxValue, maxValue)); } /** * * * @generated */ public boolean isMinInclusive() { return minInclusive; } /** * * * @generated */ public void setMinInclusive(boolean newMinInclusive) { boolean oldMinInclusive = minInclusive; minInclusive = newMinInclusive; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_INCLUSIVE, oldMinInclusive, minInclusive)); } /** * * * @generated */ public boolean isMaxInclusive() { return maxInclusive; } /** * * * @generated */ public void setMaxInclusive(boolean newMaxInclusive) { boolean oldMaxInclusive = maxInclusive; maxInclusive = newMaxInclusive; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_INCLUSIVE, oldMaxInclusive, maxInclusive)); } /** * * * @generated */ public float getDefaultValue() { return defaultValue; } /** * * * @generated */ public void setDefaultValue(float newDefaultValue) { float oldDefaultValue = defaultValue; defaultValue = newDefaultValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, BusinessDomainDslPackage.DECIMAL_PROPERTY__DEFAULT_VALUE, oldDefaultValue, defaultValue)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_VALUE: return getMinValue(); case BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_VALUE: return getMaxValue(); case BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_INCLUSIVE: return isMinInclusive(); case BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_INCLUSIVE: return isMaxInclusive(); case BusinessDomainDslPackage.DECIMAL_PROPERTY__DEFAULT_VALUE: return getDefaultValue(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_VALUE: setMinValue((Float)newValue); return; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_VALUE: setMaxValue((Float)newValue); return; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_INCLUSIVE: setMinInclusive((Boolean)newValue); return; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_INCLUSIVE: setMaxInclusive((Boolean)newValue); return; case BusinessDomainDslPackage.DECIMAL_PROPERTY__DEFAULT_VALUE: setDefaultValue((Float)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_VALUE: setMinValue(MIN_VALUE_EDEFAULT); return; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_VALUE: setMaxValue(MAX_VALUE_EDEFAULT); return; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_INCLUSIVE: setMinInclusive(MIN_INCLUSIVE_EDEFAULT); return; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_INCLUSIVE: setMaxInclusive(MAX_INCLUSIVE_EDEFAULT); return; case BusinessDomainDslPackage.DECIMAL_PROPERTY__DEFAULT_VALUE: setDefaultValue(DEFAULT_VALUE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_VALUE: return minValue != MIN_VALUE_EDEFAULT; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_VALUE: return maxValue != MAX_VALUE_EDEFAULT; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MIN_INCLUSIVE: return minInclusive != MIN_INCLUSIVE_EDEFAULT; case BusinessDomainDslPackage.DECIMAL_PROPERTY__MAX_INCLUSIVE: return maxInclusive != MAX_INCLUSIVE_EDEFAULT; case BusinessDomainDslPackage.DECIMAL_PROPERTY__DEFAULT_VALUE: return defaultValue != DEFAULT_VALUE_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (minValue: "); result.append(minValue); result.append(", maxValue: "); result.append(maxValue); result.append(", minInclusive: "); result.append(minInclusive); result.append(", maxInclusive: "); result.append(maxInclusive); result.append(", defaultValue: "); result.append(defaultValue); result.append(')'); return result.toString(); } } //DecimalPropertyImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy