blob: a4c45cbadbe3cc0ab2c54ea5bb86eb65cb9e5d39 [file] [log] [blame]
/**
* Copyright (c) 2016 Willink Transformations, Univesity of York 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:
* Adolfo Sanchez-Barbudo Herrera - initial API and implementation
*/
package delphi.impl;
import delphi.DelphiPackage;
import delphi.containsClause;
import delphi.identList;
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.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>contains Clause</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link delphi.impl.containsClauseImpl#getIdList <em>Id List</em>}</li>
* </ul>
*
* @generated
*/
public class containsClauseImpl extends CSTraceImpl implements containsClause {
/**
* The cached value of the '{@link #getIdList() <em>Id List</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getIdList()
* @generated
* @ordered
*/
protected EList<identList> idList;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected containsClauseImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return DelphiPackage.Literals.CONTAINS_CLAUSE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<identList> getIdList() {
if (idList == null) {
idList = new EObjectContainmentEList<identList>(identList.class, this, DelphiPackage.CONTAINS_CLAUSE__ID_LIST);
}
return idList;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case DelphiPackage.CONTAINS_CLAUSE__ID_LIST:
return ((InternalEList<?>)getIdList()).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 DelphiPackage.CONTAINS_CLAUSE__ID_LIST:
return getIdList();
}
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 DelphiPackage.CONTAINS_CLAUSE__ID_LIST:
getIdList().clear();
getIdList().addAll((Collection<? extends identList>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case DelphiPackage.CONTAINS_CLAUSE__ID_LIST:
getIdList().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case DelphiPackage.CONTAINS_CLAUSE__ID_LIST:
return idList != null && !idList.isEmpty();
}
return super.eIsSet(featureID);
}
} //containsClauseImpl