blob: 1193112390a0387771e09cb55e5293e579bf540b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 Fundación Tecnalia Research & Innovation.
*
* 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:
* Huascar Espinoza - initial API and implementation
* Alejandra Ruíz - initial API and implementation
* Idoya Del Río - initial API and implementation
* Mari Carmen Palacios - initial API and implementation
* Angel López - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.opencert.sam.agree.agreement.impl;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.opencert.sam.agree.agreement.AgreementPackage;
import org.eclipse.opencert.sam.agree.agreement.memory;
import org.eclipse.opencert.sam.agree.agreement.nonfunctional;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>nonfunctional</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.opencert.sam.agree.agreement.impl.nonfunctionalImpl#getNonfunctional <em>Nonfunctional</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class nonfunctionalImpl extends MinimalEObjectImpl.Container implements nonfunctional
{
/**
* The cached value of the '{@link #getNonfunctional() <em>Nonfunctional</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getNonfunctional()
* @generated
* @ordered
*/
protected EList<memory> nonfunctional;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected nonfunctionalImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return AgreementPackage.Literals.NONFUNCTIONAL;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<memory> getNonfunctional()
{
if (nonfunctional == null)
{
nonfunctional = new EObjectContainmentEList<memory>(memory.class, this, AgreementPackage.NONFUNCTIONAL__NONFUNCTIONAL);
}
return nonfunctional;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
{
switch (featureID)
{
case AgreementPackage.NONFUNCTIONAL__NONFUNCTIONAL:
return ((InternalEList<?>)getNonfunctional()).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 AgreementPackage.NONFUNCTIONAL__NONFUNCTIONAL:
return getNonfunctional();
}
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 AgreementPackage.NONFUNCTIONAL__NONFUNCTIONAL:
getNonfunctional().clear();
getNonfunctional().addAll((Collection<? extends memory>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID)
{
switch (featureID)
{
case AgreementPackage.NONFUNCTIONAL__NONFUNCTIONAL:
getNonfunctional().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID)
{
switch (featureID)
{
case AgreementPackage.NONFUNCTIONAL__NONFUNCTIONAL:
return nonfunctional != null && !nonfunctional.isEmpty();
}
return super.eIsSet(featureID);
}
} //nonfunctionalImpl