/** * generated by Xtext 2.12.0 */ package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.impl; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage; import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MemoryEntry; 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 'Memory Entry'. * *

* The following features are implemented: *

* * * @generated */ public class MemoryEntryImpl extends ConfigEntryImpl implements MemoryEntry { /** * The default value of the '{@link #getMegabyteLimit() Megabyte Limit}' attribute. * * * @see #getMegabyteLimit() * @generated * @ordered */ protected static final int MEGABYTE_LIMIT_EDEFAULT = 0; /** * The cached value of the '{@link #getMegabyteLimit() Megabyte Limit}' attribute. * * * @see #getMegabyteLimit() * @generated * @ordered */ protected int megabyteLimit = MEGABYTE_LIMIT_EDEFAULT; /** * * * @generated */ protected MemoryEntryImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return ApplicationConfigurationPackage.Literals.MEMORY_ENTRY; } /** * * * @generated */ public int getMegabyteLimit() { return megabyteLimit; } /** * * * @generated */ public void setMegabyteLimit(int newMegabyteLimit) { int oldMegabyteLimit = megabyteLimit; megabyteLimit = newMegabyteLimit; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, ApplicationConfigurationPackage.MEMORY_ENTRY__MEGABYTE_LIMIT, oldMegabyteLimit, megabyteLimit)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case ApplicationConfigurationPackage.MEMORY_ENTRY__MEGABYTE_LIMIT: return getMegabyteLimit(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case ApplicationConfigurationPackage.MEMORY_ENTRY__MEGABYTE_LIMIT: setMegabyteLimit((Integer)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.MEMORY_ENTRY__MEGABYTE_LIMIT: setMegabyteLimit(MEGABYTE_LIMIT_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case ApplicationConfigurationPackage.MEMORY_ENTRY__MEGABYTE_LIMIT: return megabyteLimit != MEGABYTE_LIMIT_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (megabyteLimit: "); result.append(megabyteLimit); result.append(')'); return result.toString(); } } //MemoryEntryImpl