Package Subset0268.impl

Source Code of Subset0268.impl.TDefinitionsImpl

/**
*/
package Subset0268.impl;

import Subset0268.Subset0268Package;
import Subset0268.TDefinitions;
import Subset0268.TPackets;

import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;

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;

/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>TDefinitions</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
*   <li>{@link Subset0268.impl.TDefinitionsImpl#getPackets <em>Packets</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class TDefinitionsImpl extends MinimalEObjectImpl.Container implements TDefinitions {
  /**
   * The cached value of the '{@link #getPackets() <em>Packets</em>}' containment reference.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @see #getPackets()
   * @generated
   * @ordered
   */
  protected TPackets packets;

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

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

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public TPackets getPackets() {
    return packets;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetPackets(TPackets newPackets, NotificationChain msgs) {
    TPackets oldPackets = packets;
    packets = newPackets;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Subset0268Package.TDEFINITIONS__PACKETS, oldPackets, newPackets);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
    return msgs;
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setPackets(TPackets newPackets) {
    if (newPackets != packets) {
      NotificationChain msgs = null;
      if (packets != null)
        msgs = ((InternalEObject)packets).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Subset0268Package.TDEFINITIONS__PACKETS, null, msgs);
      if (newPackets != null)
        msgs = ((InternalEObject)newPackets).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Subset0268Package.TDEFINITIONS__PACKETS, null, msgs);
      msgs = basicSetPackets(newPackets, msgs);
      if (msgs != null) msgs.dispatch();
    }
    else if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, Subset0268Package.TDEFINITIONS__PACKETS, newPackets, newPackets));
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
    switch (featureID) {
      case Subset0268Package.TDEFINITIONS__PACKETS:
        return basicSetPackets(null, 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 Subset0268Package.TDEFINITIONS__PACKETS:
        return getPackets();
    }
    return super.eGet(featureID, resolve, coreType);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eSet(int featureID, Object newValue) {
    switch (featureID) {
      case Subset0268Package.TDEFINITIONS__PACKETS:
        setPackets((TPackets)newValue);
        return;
    }
    super.eSet(featureID, newValue);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public void eUnset(int featureID) {
    switch (featureID) {
      case Subset0268Package.TDEFINITIONS__PACKETS:
        setPackets((TPackets)null);
        return;
    }
    super.eUnset(featureID);
  }

  /**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  @Override
  public boolean eIsSet(int featureID) {
    switch (featureID) {
      case Subset0268Package.TDEFINITIONS__PACKETS:
        return packets != null;
    }
    return super.eIsSet(featureID);
  }

} //TDefinitionsImpl
TOP

Related Classes of Subset0268.impl.TDefinitionsImpl

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.