/* * Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Eike Stepper - initial API and implementation */ package org.eclipse.oomph.setup.impl; import org.eclipse.oomph.base.impl.ModelElementImpl; import org.eclipse.oomph.setup.SetupPackage; import org.eclipse.oomph.setup.SetupTask; import org.eclipse.oomph.setup.SetupTaskContainer; 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.util.EObjectContainmentEList; import org.eclipse.emf.ecore.util.InternalEList; import java.util.Collection; /** * * An implementation of the model object 'Task Container'. * *

* The following features are implemented: *

*

* * @generated */ public abstract class SetupTaskContainerImpl extends ModelElementImpl implements SetupTaskContainer { /** * The cached value of the '{@link #getSetupTasks() Setup Tasks}' containment reference list. * * * @see #getSetupTasks() * @generated * @ordered */ protected EList setupTasks; /** * * * @generated */ protected SetupTaskContainerImpl() { super(); } /** * * * @generated */ @Override protected EClass eStaticClass() { return SetupPackage.Literals.SETUP_TASK_CONTAINER; } /** * * * @generated */ public EList getSetupTasks() { if (setupTasks == null) { setupTasks = new EObjectContainmentEList.Resolving(SetupTask.class, this, SetupPackage.SETUP_TASK_CONTAINER__SETUP_TASKS); } return setupTasks; } /** * * * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case SetupPackage.SETUP_TASK_CONTAINER__SETUP_TASKS: return ((InternalEList)getSetupTasks()).basicRemove(otherEnd, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * * * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case SetupPackage.SETUP_TASK_CONTAINER__SETUP_TASKS: return getSetupTasks(); } return super.eGet(featureID, resolve, coreType); } /** * * * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case SetupPackage.SETUP_TASK_CONTAINER__SETUP_TASKS: getSetupTasks().clear(); getSetupTasks().addAll((Collection)newValue); return; } super.eSet(featureID, newValue); } /** * * * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case SetupPackage.SETUP_TASK_CONTAINER__SETUP_TASKS: getSetupTasks().clear(); return; } super.eUnset(featureID); } /** * * * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case SetupPackage.SETUP_TASK_CONTAINER__SETUP_TASKS: return setupTasks != null && !setupTasks.isEmpty(); } return super.eIsSet(featureID); } } // SetupTaskContainerImpl