Package Subset0267.impl

Source Code of Subset0267.impl.TConditionalImpl

/**
*/
package Subset0267.impl;

import Subset0267.Subset0267Package;
import Subset0267.TConditional;
import Subset0267.TVariables;

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.BasicFeatureMap;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.InternalEList;

/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>TConditional</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
*   <li>{@link Subset0267.impl.TConditionalImpl#getGroup <em>Group</em>}</li>
*   <li>{@link Subset0267.impl.TConditionalImpl#getCondition <em>Condition</em>}</li>
*   <li>{@link Subset0267.impl.TConditionalImpl#getVariables <em>Variables</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class TConditionalImpl extends MinimalEObjectImpl.Container implements TConditional {
  /**
   * The cached value of the '{@link #getGroup() <em>Group</em>}' attribute list.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getGroup()
   * @generated
   * @ordered
   */
  protected FeatureMap group;

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  protected TConditionalImpl() {
    super();
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  protected EClass eStaticClass() {
    return Subset0267Package.Literals.TCONDITIONAL;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public FeatureMap getGroup() {
    if (group == null) {
      group = new BasicFeatureMap(this, Subset0267Package.TCONDITIONAL__GROUP);
    }
    return group;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<String> getCondition() {
    return getGroup().list(Subset0267Package.Literals.TCONDITIONAL__CONDITION);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public EList<TVariables> getVariables() {
    return getGroup().list(Subset0267Package.Literals.TCONDITIONAL__VARIABLES);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
    switch (featureID) {
      case Subset0267Package.TCONDITIONAL__GROUP:
        return ((InternalEList<?>)getGroup()).basicRemove(otherEnd, msgs);
      case Subset0267Package.TCONDITIONAL__VARIABLES:
        return ((InternalEList<?>)getVariables()).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 Subset0267Package.TCONDITIONAL__GROUP:
        if (coreType) return getGroup();
        return ((FeatureMap.Internal)getGroup()).getWrapper();
      case Subset0267Package.TCONDITIONAL__CONDITION:
        return getCondition();
      case Subset0267Package.TCONDITIONAL__VARIABLES:
        return getVariables();
    }
    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 Subset0267Package.TCONDITIONAL__GROUP:
        ((FeatureMap.Internal)getGroup()).set(newValue);
        return;
      case Subset0267Package.TCONDITIONAL__CONDITION:
        getCondition().clear();
        getCondition().addAll((Collection<? extends String>)newValue);
        return;
      case Subset0267Package.TCONDITIONAL__VARIABLES:
        getVariables().clear();
        getVariables().addAll((Collection<? extends TVariables>)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID) {
    switch (featureID) {
      case Subset0267Package.TCONDITIONAL__GROUP:
        getGroup().clear();
        return;
      case Subset0267Package.TCONDITIONAL__CONDITION:
        getCondition().clear();
        return;
      case Subset0267Package.TCONDITIONAL__VARIABLES:
        getVariables().clear();
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID) {
    switch (featureID) {
      case Subset0267Package.TCONDITIONAL__GROUP:
        return group != null && !group.isEmpty();
      case Subset0267Package.TCONDITIONAL__CONDITION:
        return !getCondition().isEmpty();
      case Subset0267Package.TCONDITIONAL__VARIABLES:
        return !getVariables().isEmpty();
    }
    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(" (group: ");
    result.append(group);
    result.append(')');
    return result.toString();
  }

} //TConditionalImpl
TOP

Related Classes of Subset0267.impl.TConditionalImpl

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.