blob: fa26d469f85dd8e933f455ef99f8914279cf7944 [file] [log] [blame]
/**
* Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* 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:
* Florian Pirchner - Initial implementation
*/
package org.eclipse.osbp.ecview.semantic.uisemantics.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.eclipse.osbp.ecview.semantic.uisemantics.UiSemanticsPackage;
import org.eclipse.osbp.ecview.semantic.uisemantics.UxAvailableVisibilityOptions;
import org.eclipse.osbp.ecview.semantic.uisemantics.UxVisibleableOption;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Ux Available Visibility Options</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.osbp.ecview.semantic.uisemantics.impl.UxAvailableVisibilityOptionsImpl#getBindings <em>Bindings</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class UxAvailableVisibilityOptionsImpl extends MinimalEObjectImpl.Container implements UxAvailableVisibilityOptions {
/**
* The cached value of the '{@link #getBindings() <em>Bindings</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getBindings()
* @generated
* @ordered
*/
protected EList<UxVisibleableOption> bindings;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected UxAvailableVisibilityOptionsImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return UiSemanticsPackage.Literals.UX_AVAILABLE_VISIBILITY_OPTIONS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<UxVisibleableOption> getBindings() {
if (bindings == null) {
bindings = new EObjectContainmentEList<UxVisibleableOption>(UxVisibleableOption.class, this, UiSemanticsPackage.UX_AVAILABLE_VISIBILITY_OPTIONS__BINDINGS);
}
return bindings;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case UiSemanticsPackage.UX_AVAILABLE_VISIBILITY_OPTIONS__BINDINGS:
return ((InternalEList<?>)getBindings()).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 UiSemanticsPackage.UX_AVAILABLE_VISIBILITY_OPTIONS__BINDINGS:
return getBindings();
}
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 UiSemanticsPackage.UX_AVAILABLE_VISIBILITY_OPTIONS__BINDINGS:
getBindings().clear();
getBindings().addAll((Collection<? extends UxVisibleableOption>)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case UiSemanticsPackage.UX_AVAILABLE_VISIBILITY_OPTIONS__BINDINGS:
getBindings().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case UiSemanticsPackage.UX_AVAILABLE_VISIBILITY_OPTIONS__BINDINGS:
return bindings != null && !bindings.isEmpty();
}
return super.eIsSet(featureID);
}
} //UxAvailableVisibilityOptionsImpl