blob: 99dd4328e5fcb7a903a9b3b9970d149b49a8ef00 [file] [log] [blame]
/*******************************************************************************
* CHESS core plugin
*
* Copyright (C) 2011-2015
* Mälardalen University, Sweden
*
*
* 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
*******************************************************************************/
/**
*/
package org.polarsys.chess.fla.flaxml.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.polarsys.chess.fla.flaxml.FlaxmlPackage;
import org.polarsys.chess.fla.flaxml.InputPort;
import org.polarsys.chess.fla.flaxml.InputPorts;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Input Ports</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.polarsys.chess.fla.flaxml.impl.InputPortsImpl#getInputPort <em>Input Port</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class InputPortsImpl extends MinimalEObjectImpl.Container implements InputPorts {
/**
* The cached value of the '{@link #getInputPort() <em>Input Port</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getInputPort()
* @generated
* @ordered
*/
protected EList<InputPort> inputPort;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected InputPortsImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FlaxmlPackage.Literals.INPUT_PORTS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<InputPort> getInputPort() {
if (inputPort == null) {
inputPort = new EObjectContainmentEList<InputPort>(InputPort.class, this, FlaxmlPackage.INPUT_PORTS__INPUT_PORT);
}
return inputPort;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FlaxmlPackage.INPUT_PORTS__INPUT_PORT:
return ((InternalEList<?>)getInputPort()).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 FlaxmlPackage.INPUT_PORTS__INPUT_PORT:
return getInputPort();
}
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 FlaxmlPackage.INPUT_PORTS__INPUT_PORT:
getInputPort().clear();
getInputPort().addAll((Collection<? extends InputPort>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FlaxmlPackage.INPUT_PORTS__INPUT_PORT:
getInputPort().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FlaxmlPackage.INPUT_PORTS__INPUT_PORT:
return inputPort != null && !inputPort.isEmpty();
}
return super.eIsSet(featureID);
}
} //InputPortsImpl