| /** |
| */ |
| package org.eclipse.fx.xtext.statemachine.statemachine.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.fx.xtext.statemachine.statemachine.Condition; |
| import org.eclipse.fx.xtext.statemachine.statemachine.Event; |
| import org.eclipse.fx.xtext.statemachine.statemachine.StatemachinePackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Condition</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.fx.xtext.statemachine.statemachine.impl.ConditionImpl#getEvents <em>Events</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class ConditionImpl extends MinimalEObjectImpl.Container implements Condition |
| { |
| /** |
| * The cached value of the '{@link #getEvents() <em>Events</em>}' containment reference list. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getEvents() |
| * @generated |
| * @ordered |
| */ |
| protected EList<Event> events; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ConditionImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return StatemachinePackage.Literals.CONDITION; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EList<Event> getEvents() |
| { |
| if (events == null) |
| { |
| events = new EObjectContainmentEList<Event>(Event.class, this, StatemachinePackage.CONDITION__EVENTS); |
| } |
| return events; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) |
| { |
| switch (featureID) |
| { |
| case StatemachinePackage.CONDITION__EVENTS: |
| return ((InternalEList<?>)getEvents()).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 StatemachinePackage.CONDITION__EVENTS: |
| return getEvents(); |
| } |
| 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 StatemachinePackage.CONDITION__EVENTS: |
| getEvents().clear(); |
| getEvents().addAll((Collection<? extends Event>)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case StatemachinePackage.CONDITION__EVENTS: |
| getEvents().clear(); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case StatemachinePackage.CONDITION__EVENTS: |
| return events != null && !events.isEmpty(); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| } //ConditionImpl |