/** * generated by Xtext 2.14.0 */ package ca.mcgill.ecse.dslreasoner.vampireLanguage.impl; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSComment; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSConfirmations; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSFofFormula; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VLSTffFormula; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireLanguagePackage; import ca.mcgill.ecse.dslreasoner.vampireLanguage.VampireModel; import java.util.Collection; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; /** * * An implementation of the model object 'Vampire Model'. * *

* The following features are implemented: *

* * * @generated */ public class VampireModelImpl extends MinimalEObjectImpl.Container implements VampireModel { /** * The cached value of the '{@link #getComments() Comments}' containment reference list. * * * @see #getComments() * @generated * @ordered */ protected EList comments; /** * The cached value of the '{@link #getConfirmations() Confirmations}' containment reference list. * * * @see #getConfirmations() * @generated * @ordered */ protected EList confirmations; /** * The cached value of the '{@link #getFormulas() Formulas}' containment reference list. * * * @see #getFormulas() * @generated * @ordered */ protected EList formulas; /** * The cached value of the '{@link #getTfformulas() Tfformulas}' containment reference list. * * * @see #getTfformulas() * @generated * @ordered */ protected EList tfformulas; /** * * * @generated */ protected VampireModelImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return VampireLanguagePackage.Literals.VAMPIRE_MODEL; } /** * * * @generated */ public EList getComments() { if (comments == null) { comments = new EObjectContainmentEList(VLSComment.class, this, VampireLanguagePackage.VAMPIRE_MODEL__COMMENTS); } return comments; } /** * * * @generated */ public EList getConfirmations() { if (confirmations == null) { confirmations = new EObjectContainmentEList(VLSConfirmations.class, this, VampireLanguagePackage.VAMPIRE_MODEL__CONFIRMATIONS); } return confirmations; } /** * * * @generated */ public EList getFormulas() { if (formulas == null) { formulas = new EObjectContainmentEList(VLSFofFormula.class, this, VampireLanguagePackage.VAMPIRE_MODEL__FORMULAS); } return formulas; } /** * * * @generated */ public EList getTfformulas() { if (tfformulas == null) { tfformulas = new EObjectContainmentEList(VLSTffFormula.class, this, VampireLanguagePackage.VAMPIRE_MODEL__TFFORMULAS); } return tfformulas; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case VampireLanguagePackage.VAMPIRE_MODEL__COMMENTS: return ((InternalEList)getComments()).basicRemove(otherEnd, msgs); case VampireLanguagePackage.VAMPIRE_MODEL__CONFIRMATIONS: return ((InternalEList)getConfirmations()).basicRemove(otherEnd, msgs); case VampireLanguagePackage.VAMPIRE_MODEL__FORMULAS: return ((InternalEList)getFormulas()).basicRemove(otherEnd, msgs); case VampireLanguagePackage.VAMPIRE_MODEL__TFFORMULAS: return ((InternalEList)getTfformulas()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case VampireLanguagePackage.VAMPIRE_MODEL__COMMENTS: return getComments(); case VampireLanguagePackage.VAMPIRE_MODEL__CONFIRMATIONS: return getConfirmations(); case VampireLanguagePackage.VAMPIRE_MODEL__FORMULAS: return getFormulas(); case VampireLanguagePackage.VAMPIRE_MODEL__TFFORMULAS: return getTfformulas(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case VampireLanguagePackage.VAMPIRE_MODEL__COMMENTS: getComments().clear(); getComments().addAll((Collection)newValue); return; case VampireLanguagePackage.VAMPIRE_MODEL__CONFIRMATIONS: getConfirmations().clear(); getConfirmations().addAll((Collection)newValue); return; case VampireLanguagePackage.VAMPIRE_MODEL__FORMULAS: getFormulas().clear(); getFormulas().addAll((Collection)newValue); return; case VampireLanguagePackage.VAMPIRE_MODEL__TFFORMULAS: getTfformulas().clear(); getTfformulas().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case VampireLanguagePackage.VAMPIRE_MODEL__COMMENTS: getComments().clear(); return; case VampireLanguagePackage.VAMPIRE_MODEL__CONFIRMATIONS: getConfirmations().clear(); return; case VampireLanguagePackage.VAMPIRE_MODEL__FORMULAS: getFormulas().clear(); return; case VampireLanguagePackage.VAMPIRE_MODEL__TFFORMULAS: getTfformulas().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case VampireLanguagePackage.VAMPIRE_MODEL__COMMENTS: return comments != null && !comments.isEmpty(); case VampireLanguagePackage.VAMPIRE_MODEL__CONFIRMATIONS: return confirmations != null && !confirmations.isEmpty(); case VampireLanguagePackage.VAMPIRE_MODEL__FORMULAS: return formulas != null && !formulas.isEmpty(); case VampireLanguagePackage.VAMPIRE_MODEL__TFFORMULAS: return tfformulas != null && !tfformulas.isEmpty(); } return super.eIsSet(featureID); } } //VampireModelImpl