| /** |
| */ |
| package org.eclipse.papyrus.interoperability.rpy.parser.rpySyntax.impl; |
| |
| 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.util.EObjectContainmentEList; |
| import org.eclipse.emf.ecore.util.InternalEList; |
| |
| import org.eclipse.papyrus.interoperability.rpy.parser.rpySyntax.RpyStringMap; |
| import org.eclipse.papyrus.interoperability.rpy.parser.rpySyntax.RpyStringMapEntry; |
| import org.eclipse.papyrus.interoperability.rpy.parser.rpySyntax.RpySyntaxPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Rpy String Map</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.interoperability.rpy.parser.rpySyntax.impl.RpyStringMapImpl#getEntries <em>Entries</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class RpyStringMapImpl extends RpyFeatureValueImpl implements RpyStringMap |
| { |
| /** |
| * The cached value of the '{@link #getEntries() <em>Entries</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEntries() |
| * @generated |
| * @ordered |
| */ |
| protected EList<RpyStringMapEntry> entries; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected RpyStringMapImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return RpySyntaxPackage.Literals.RPY_STRING_MAP; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<RpyStringMapEntry> getEntries() |
| { |
| if (entries == null) |
| { |
| entries = new EObjectContainmentEList<RpyStringMapEntry>(RpyStringMapEntry.class, this, RpySyntaxPackage.RPY_STRING_MAP__ENTRIES); |
| } |
| return entries; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) |
| { |
| switch (featureID) |
| { |
| case RpySyntaxPackage.RPY_STRING_MAP__ENTRIES: |
| return ((InternalEList<?>)getEntries()).basicRemove(otherEnd, msgs); |
| } |
| return super.eInverseRemove(otherEnd, featureID, msgs); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) |
| { |
| case RpySyntaxPackage.RPY_STRING_MAP__ENTRIES: |
| return getEntries(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @SuppressWarnings("unchecked") |
| @Override |
| public void eSet(int featureID, Object newValue) |
| { |
| switch (featureID) |
| { |
| case RpySyntaxPackage.RPY_STRING_MAP__ENTRIES: |
| getEntries().clear(); |
| getEntries().addAll((Collection<? extends RpyStringMapEntry>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case RpySyntaxPackage.RPY_STRING_MAP__ENTRIES: |
| getEntries().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case RpySyntaxPackage.RPY_STRING_MAP__ENTRIES: |
| return entries != null && !entries.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //RpyStringMapImpl |