All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.afplib.afplib.impl.ExternalAlgorithmImpl Maven / Gradle / Ivy

/**
 */
package org.afplib.afplib.impl;

import java.util.Collection;

import org.afplib.afplib.AfplibPackage;
import org.afplib.afplib.ExternalAlgorithm;
import org.afplib.afplib.ExternalAlgorithmRG;

import org.afplib.base.impl.TripletImpl;

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

/**
 * 
 * An implementation of the model object 'External Algorithm'.
 * 
 * 

* The following features are implemented: *

    *
  • {@link org.afplib.afplib.impl.ExternalAlgorithmImpl#getALGTYPE ALGTYPE}
  • *
  • {@link org.afplib.afplib.impl.ExternalAlgorithmImpl#getRg Rg}
  • *
*

* * @generated */ public class ExternalAlgorithmImpl extends TripletImpl implements ExternalAlgorithm { /** * The default value of the '{@link #getALGTYPE() ALGTYPE}' attribute. * * * @see #getALGTYPE() * @generated * @ordered */ protected static final Integer ALGTYPE_EDEFAULT = null; /** * The cached value of the '{@link #getALGTYPE() ALGTYPE}' attribute. * * * @see #getALGTYPE() * @generated * @ordered */ protected Integer algtype = ALGTYPE_EDEFAULT; /** * The cached value of the '{@link #getRg() Rg}' containment reference list. * * * @see #getRg() * @generated * @ordered */ protected EList rg; /** * * * @generated */ protected ExternalAlgorithmImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return AfplibPackage.eINSTANCE.getExternalAlgorithm(); } /** * * * @generated */ public Integer getALGTYPE() { return algtype; } /** * * * @generated */ public void setALGTYPE(Integer newALGTYPE) { Integer oldALGTYPE = algtype; algtype = newALGTYPE; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.EXTERNAL_ALGORITHM__ALGTYPE, oldALGTYPE, algtype)); } /** * * * @generated */ public EList getRg() { if (rg == null) { rg = new EObjectContainmentEList.Resolving(ExternalAlgorithmRG.class, this, AfplibPackage.EXTERNAL_ALGORITHM__RG); } return rg; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case AfplibPackage.EXTERNAL_ALGORITHM__RG: return ((InternalEList)getRg()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.EXTERNAL_ALGORITHM__ALGTYPE: return getALGTYPE(); case AfplibPackage.EXTERNAL_ALGORITHM__RG: return getRg(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case AfplibPackage.EXTERNAL_ALGORITHM__ALGTYPE: setALGTYPE((Integer)newValue); return; case AfplibPackage.EXTERNAL_ALGORITHM__RG: getRg().clear(); getRg().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.EXTERNAL_ALGORITHM__ALGTYPE: setALGTYPE(ALGTYPE_EDEFAULT); return; case AfplibPackage.EXTERNAL_ALGORITHM__RG: getRg().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.EXTERNAL_ALGORITHM__ALGTYPE: return ALGTYPE_EDEFAULT == null ? algtype != null : !ALGTYPE_EDEFAULT.equals(algtype); case AfplibPackage.EXTERNAL_ALGORITHM__RG: return rg != null && !rg.isEmpty(); } return super.eIsSet(featureID); } /** * * * @generated */ @Override public String toString() { if (eIsProxy()) return super.toString(); StringBuffer result = new StringBuffer(super.toString()); result.append(" (ALGTYPE: "); result.append(algtype); result.append(')'); return result.toString(); } } //ExternalAlgorithmImpl




© 2015 - 2025 Weber Informatics LLC | Privacy Policy