/**
* <copyright>
* </copyright>
*
* $Id$
*/
package at.bestsolution.efxclipse.formats.fxg.fxg.impl;
import at.bestsolution.efxclipse.formats.fxg.fxg.FxgPackage;
import at.bestsolution.efxclipse.formats.fxg.fxg.RichTextContent;
import at.bestsolution.efxclipse.formats.fxg.fxg.RichTextContentContainer;
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.EObjectImpl;
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>Rich Text Content Container</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link at.bestsolution.efxclipse.formats.fxg.fxg.impl.RichTextContentContainerImpl#get_children <em>children</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class RichTextContentContainerImpl extends EObjectImpl implements RichTextContentContainer {
/**
* The cached value of the '{@link #get_children() <em>children</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #get_children()
* @generated
* @ordered
*/
protected EList<RichTextContent> _children;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected RichTextContentContainerImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return FxgPackage.Literals.RICH_TEXT_CONTENT_CONTAINER;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<RichTextContent> get_children() {
if (_children == null) {
_children = new EObjectContainmentEList<RichTextContent>(RichTextContent.class, this, FxgPackage.RICH_TEXT_CONTENT_CONTAINER__CHILDREN);
}
return _children;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case FxgPackage.RICH_TEXT_CONTENT_CONTAINER__CHILDREN:
return ((InternalEList<?>)get_children()).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 FxgPackage.RICH_TEXT_CONTENT_CONTAINER__CHILDREN:
return get_children();
}
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 FxgPackage.RICH_TEXT_CONTENT_CONTAINER__CHILDREN:
get_children().clear();
get_children().addAll((Collection<? extends RichTextContent>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case FxgPackage.RICH_TEXT_CONTENT_CONTAINER__CHILDREN:
get_children().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case FxgPackage.RICH_TEXT_CONTENT_CONTAINER__CHILDREN:
return _children != null && !_children.isEmpty();
}
return super.eIsSet(featureID);
}
} //RichTextContentContainerImpl