/** */ package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; 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 'Nary Relation Link Element'. * *

* The following features are implemented: *

* * * @generated */ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container implements NaryRelationLinkElement { /** * The default value of the '{@link #getIndex() Index}' attribute. * * * @see #getIndex() * @generated * @ordered */ protected static final int INDEX_EDEFAULT = 0; /** * The cached value of the '{@link #getIndex() Index}' attribute. * * * @see #getIndex() * @generated * @ordered */ protected int index = INDEX_EDEFAULT; /** * * * @generated */ protected NaryRelationLinkElementImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return PartialinterpretationPackage.Literals.NARY_RELATION_LINK_ELEMENT; } /** * * * @generated */ public int getIndex() { return index; } /** * * * @generated */ public void setIndex(int newIndex) { int oldIndex = index; index = newIndex; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX, oldIndex, index)); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX: return getIndex(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX: setIndex((Integer)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX: setIndex(INDEX_EDEFAULT); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX: return index != INDEX_EDEFAULT; } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (index: "); result.append(index); result.append(')'); return result.toString(); } } //NaryRelationLinkElementImpl