content: /**
   */
  package com.intel.llvm.ireditor.lLVM_IR.impl;
  
  import com.intel.llvm.ireditor.lLVM_IR.LLVM_IRPackage;
  import com.intel.llvm.ireditor.lLVM_IR.Parameter;
  import com.intel.llvm.ireditor.lLVM_IR.Parameters;
  
  import java.util.Collection;
  
  import org.eclipse.emf.common.notify.Notification;
  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.ENotificationImpl;
  import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
  
  import org.eclipse.emf.ecore.util.EObjectContainmentEList;
  import org.eclipse.emf.ecore.util.InternalEList;
  
  /**
   * <!-- begin-user-doc -->
   * An implementation of the model object '<em><b>Parameters</b></em>'.
   * <!-- end-user-doc -->
   * <p>
   * The following features are implemented:
   * <ul>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.ParametersImpl#getParameters <em>Parameters</em>}</li>
   *   <li>{@link com.intel.llvm.ireditor.lLVM_IR.impl.ParametersImpl#getVararg <em>Vararg</em>}</li>
   * </ul>
   * </p>
   *
   * @generated
   */
  public class ParametersImpl extends MinimalEObjectImpl.Container implements Parameters
  {
    /**
     * The cached value of the '{@link #getParameters() <em>Parameters</em>}' containment reference list.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getParameters()
     * @generated
     * @ordered
     */
    protected EList<Parameter> parameters;
  
    /**
     * The default value of the '{@link #getVararg() <em>Vararg</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getVararg()
     * @generated
     * @ordered
     */
    protected static final String VARARG_EDEFAULT = null;
  
    /**
     * The cached value of the '{@link #getVararg() <em>Vararg</em>}' attribute.
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @see #getVararg()
     * @generated
     * @ordered
     */
    protected String vararg = VARARG_EDEFAULT;
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected ParametersImpl()
    {
      super();
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass()
    {
      return LLVM_IRPackage.Literals.PARAMETERS;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EList<Parameter> getParameters()
    {
      if (parameters == null)
      {
        parameters = new EObjectContainmentEList<Parameter>(Parameter.class, this, LLVM_IRPackage.PARAMETERS__PARAMETERS);
      }
      return parameters;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public String getVararg()
    {
      return vararg;
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public void setVararg(String newVararg)
    {
      String oldVararg = vararg;
      vararg = newVararg;
      if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, LLVM_IRPackage.PARAMETERS__VARARG, oldVararg, vararg));
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.PARAMETERS__PARAMETERS:
          return ((InternalEList<?>)getParameters()).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 LLVM_IRPackage.PARAMETERS__PARAMETERS:
          return getParameters();
        case LLVM_IRPackage.PARAMETERS__VARARG:
          return getVararg();
      }
      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 LLVM_IRPackage.PARAMETERS__PARAMETERS:
          getParameters().clear();
          getParameters().addAll((Collection<? extends Parameter>)newValue);
          return;
        case LLVM_IRPackage.PARAMETERS__VARARG:
          setVararg((String)newValue);
          return;
      }
      super.eSet(featureID, newValue);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.PARAMETERS__PARAMETERS:
          getParameters().clear();
          return;
        case LLVM_IRPackage.PARAMETERS__VARARG:
          setVararg(VARARG_EDEFAULT);
          return;
      }
      super.eUnset(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID)
    {
      switch (featureID)
      {
        case LLVM_IRPackage.PARAMETERS__PARAMETERS:
          return parameters != null && !parameters.isEmpty();
        case LLVM_IRPackage.PARAMETERS__VARARG:
          return VARARG_EDEFAULT == null ? vararg != null : !VARARG_EDEFAULT.equals(vararg);
      }
      return super.eIsSet(featureID);
    }
  
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public String toString()
    {
      if (eIsProxy()) return super.toString();
  
      StringBuffer result = new StringBuffer(super.toString());
      result.append(" (vararg: ");
      result.append(vararg);
      result.append(')');
      return result.toString();
    }
  
  } //ParametersImpl
  