blob: 9a73a7f9d3cff3efbdc5a0f159a05bd258be7228 [file] [log] [blame]
/**
* ****************************************************************************
* Copyright (c) 2020 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Asma Smaoui (CEA LIST) asma.smaoui@cea.fr - Initial API and implementation
*
* ****************************************************************************
*/
package io.shell.admin.aas._1._0.impl;
import io.shell.admin.aas._1._0.KeyT;
import io.shell.admin.aas._1._0.KeysT;
import io.shell.admin.aas._1._0._0Package;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Keys T</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link io.shell.admin.aas._1._0.impl.KeysTImpl#getKey <em>Key</em>}</li>
* </ul>
*
* @generated
*/
public class KeysTImpl extends MinimalEObjectImpl.Container implements KeysT {
/**
* The cached value of the '{@link #getKey() <em>Key</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getKey()
* @generated
* @ordered
*/
protected EList<KeyT> key;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected KeysTImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return _0Package.Literals.KEYS_T;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<KeyT> getKey() {
if (key == null) {
key = new EObjectContainmentEList<KeyT>(KeyT.class, this, _0Package.KEYS_T__KEY);
}
return key;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case _0Package.KEYS_T__KEY:
return ((InternalEList<?>)getKey()).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 _0Package.KEYS_T__KEY:
return getKey();
}
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 _0Package.KEYS_T__KEY:
getKey().clear();
getKey().addAll((Collection<? extends KeyT>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case _0Package.KEYS_T__KEY:
getKey().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case _0Package.KEYS_T__KEY:
return key != null && !key.isEmpty();
}
return super.eIsSet(featureID);
}
} //KeysTImpl