/** * generated by Xtext 2.21.0 */ package org.eclipse.viatra.solver.language.solverLanguage.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.viatra.solver.language.solverLanguage.Node; import org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage; /** * * An implementation of the model object 'Node'. * *

* The following features are implemented: *

* * * @generated */ public class NodeImpl extends NamedElementImpl implements Node { /** * The default value of the '{@link #isWithId() With Id}' attribute. * * * @see #isWithId() * @generated * @ordered */ protected static final boolean WITH_ID_EDEFAULT = false; /** * The cached value of the '{@link #isWithId() With Id}' attribute. * * * @see #isWithId() * @generated * @ordered */ protected boolean withId = WITH_ID_EDEFAULT; /** * * * @generated */ protected NodeImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SolverLanguagePackage.Literals.NODE; } /** * * * @generated */ @Override public boolean isWithId() { return withId; } /** * * * @generated */ @Override public void setWithId(boolean newWithId) { boolean oldWithId = withId; withId = newWithId; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, SolverLanguagePackage.NODE__WITH_ID, oldWithId, withId)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SolverLanguagePackage.NODE__WITH_ID: return isWithId(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SolverLanguagePackage.NODE__WITH_ID: setWithId((Boolean)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SolverLanguagePackage.NODE__WITH_ID: setWithId(WITH_ID_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SolverLanguagePackage.NODE__WITH_ID: return withId != WITH_ID_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuilder result = new StringBuilder(super.toString()); result.append(" (withId: "); result.append(withId); result.append(')'); return result.toString(); } } //NodeImpl