/**
*/
package functionalarchitecture.impl;
import functionalarchitecture.FunctionalInput;
import functionalarchitecture.FunctionalarchitecturePackage;
import functionalarchitecture.InformationLink;
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.util.EObjectWithInverseResolvingEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
*
* An implementation of the model object 'Functional Input'.
*
*
* The following features are implemented:
*
*
* - {@link functionalarchitecture.impl.FunctionalInputImpl#getIncomingLinks Incoming Links}
*
*
* @generated
*/
public class FunctionalInputImpl extends FunctionalDataImpl implements FunctionalInput {
/**
* The cached value of the '{@link #getIncomingLinks() Incoming Links}' reference list.
*
*
* @see #getIncomingLinks()
* @generated
* @ordered
*/
protected EList incomingLinks;
/**
*
*
* @generated
*/
protected FunctionalInputImpl() {
super();
}
/**
*
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return FunctionalarchitecturePackage.Literals.FUNCTIONAL_INPUT;
}
/**
*
*
* @generated
*/
@Override
public EList getIncomingLinks() {
if (incomingLinks == null) {
incomingLinks = new EObjectWithInverseResolvingEList(InformationLink.class, this, FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalarchitecturePackage.INFORMATION_LINK__TO);
}
return incomingLinks;
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
return ((InternalEList)(InternalEList>)getIncomingLinks()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
return ((InternalEList>)getIncomingLinks()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
*
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
return getIncomingLinks();
}
return super.eGet(featureID, resolve, coreType);
}
/**
*
*
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
getIncomingLinks().clear();
getIncomingLinks().addAll((Collection extends InformationLink>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
*
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
getIncomingLinks().clear();
return;
}
super.eUnset(featureID);
}
/**
*
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FunctionalarchitecturePackage.FUNCTIONAL_INPUT__INCOMING_LINKS:
return incomingLinks != null && !incomingLinks.isEmpty();
}
return super.eIsSet(featureID);
}
} //FunctionalInputImpl