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

org.contextmapper.tactic.dsl.tacticdsl.impl.EnumParameterImpl Maven / Gradle / Ivy

/**
 * generated by Xtext 2.20.0
 */
package org.contextmapper.tactic.dsl.tacticdsl.impl;

import org.contextmapper.tactic.dsl.tacticdsl.EnumParameter;
import org.contextmapper.tactic.dsl.tacticdsl.TacticdslPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;

/**
 * 
 * An implementation of the model object 'Enum Parameter'.
 * 
 * 

* The following features are implemented: *

*
    *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EnumParameterImpl#getValue Value}
  • *
  • {@link org.contextmapper.tactic.dsl.tacticdsl.impl.EnumParameterImpl#getIntegerValue Integer Value}
  • *
* * @generated */ public class EnumParameterImpl extends MinimalEObjectImpl.Container implements EnumParameter { /** * The default value of the '{@link #getValue() Value}' attribute. * * * @see #getValue() * @generated * @ordered */ protected static final String VALUE_EDEFAULT = null; /** * The cached value of the '{@link #getValue() Value}' attribute. * * * @see #getValue() * @generated * @ordered */ protected String value = VALUE_EDEFAULT; /** * The default value of the '{@link #getIntegerValue() Integer Value}' attribute. * * * @see #getIntegerValue() * @generated * @ordered */ protected static final int INTEGER_VALUE_EDEFAULT = 0; /** * The cached value of the '{@link #getIntegerValue() Integer Value}' attribute. * * * @see #getIntegerValue() * @generated * @ordered */ protected int integerValue = INTEGER_VALUE_EDEFAULT; /** * * * @generated */ protected EnumParameterImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return TacticdslPackage.Literals.ENUM_PARAMETER; } /** * * * @generated */ public String getValue() { return value; } /** * * * @generated */ public void setValue(String newValue) { String oldValue = value; value = newValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENUM_PARAMETER__VALUE, oldValue, value)); } /** * * * @generated */ public int getIntegerValue() { return integerValue; } /** * * * @generated */ public void setIntegerValue(int newIntegerValue) { int oldIntegerValue = integerValue; integerValue = newIntegerValue; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, TacticdslPackage.ENUM_PARAMETER__INTEGER_VALUE, oldIntegerValue, integerValue)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case TacticdslPackage.ENUM_PARAMETER__VALUE: return getValue(); case TacticdslPackage.ENUM_PARAMETER__INTEGER_VALUE: return getIntegerValue(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TacticdslPackage.ENUM_PARAMETER__VALUE: setValue((String)newValue); return; case TacticdslPackage.ENUM_PARAMETER__INTEGER_VALUE: setIntegerValue((Integer)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case TacticdslPackage.ENUM_PARAMETER__VALUE: setValue(VALUE_EDEFAULT); return; case TacticdslPackage.ENUM_PARAMETER__INTEGER_VALUE: setIntegerValue(INTEGER_VALUE_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case TacticdslPackage.ENUM_PARAMETER__VALUE: return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); case TacticdslPackage.ENUM_PARAMETER__INTEGER_VALUE: return integerValue != INTEGER_VALUE_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (value: "); result.append(value); result.append(", integerValue: "); result.append(integerValue); result.append(')'); return result.toString(); } } //EnumParameterImpl




© 2015 - 2024 Weber Informatics LLC | Privacy Policy