| /** |
| * ******************************************************************************* |
| * Copyright (c) 2015-2021 Robert Bosch GmbH and others. |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Generated using Eclipse EMF |
| * |
| * ******************************************************************************* |
| */ |
| package org.eclipse.app4mc.amalthea.model.impl; |
| |
| import java.util.Collection; |
| |
| import org.eclipse.app4mc.amalthea.model.AmaltheaPackage; |
| import org.eclipse.app4mc.amalthea.model.ProcessChain; |
| |
| import org.eclipse.emf.common.util.EList; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Process Chain</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.app4mc.amalthea.model.impl.ProcessChainImpl#getProcesses <em>Processes</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ProcessChainImpl extends ReferableBaseObjectImpl implements ProcessChain { |
| /** |
| * The cached value of the '{@link #getProcesses() <em>Processes</em>}' reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getProcesses() |
| * @generated |
| * @ordered |
| */ |
| protected EList<org.eclipse.app4mc.amalthea.model.Process> processes; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ProcessChainImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return AmaltheaPackage.eINSTANCE.getProcessChain(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EList<org.eclipse.app4mc.amalthea.model.Process> getProcesses() { |
| if (processes == null) { |
| processes = new EObjectResolvingEList<org.eclipse.app4mc.amalthea.model.Process>(org.eclipse.app4mc.amalthea.model.Process.class, this, AmaltheaPackage.PROCESS_CHAIN__PROCESSES); |
| } |
| return processes; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case AmaltheaPackage.PROCESS_CHAIN__PROCESSES: |
| return getProcesses(); |
| } |
| 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 AmaltheaPackage.PROCESS_CHAIN__PROCESSES: |
| getProcesses().clear(); |
| getProcesses().addAll((Collection<? extends org.eclipse.app4mc.amalthea.model.Process>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case AmaltheaPackage.PROCESS_CHAIN__PROCESSES: |
| getProcesses().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case AmaltheaPackage.PROCESS_CHAIN__PROCESSES: |
| return processes != null && !processes.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ProcessChainImpl |