| /** |
| * ******************************************************************************* |
| * Copyright (c) 2017 Timing-Architects Embedded Systems GmbH 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 |
| * |
| * Generated using Eclipse EMF |
| * |
| * ******************************************************************************* |
| */ |
| package org.eclipse.app4mc.amalthea.generator.configuration.impl; |
| |
| import java.math.BigInteger; |
| |
| import org.eclipse.app4mc.amalthea.generator.configuration.Activation; |
| import org.eclipse.app4mc.amalthea.generator.configuration.RTMGCPackage; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Activation</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.app4mc.amalthea.generator.configuration.impl.ActivationImpl#getAppearanceProbability <em>Appearance Probability</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public abstract class ActivationImpl extends MinimalEObjectImpl.Container implements Activation { |
| /** |
| * The default value of the '{@link #getAppearanceProbability() <em>Appearance Probability</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAppearanceProbability() |
| * @generated |
| * @ordered |
| */ |
| protected static final BigInteger APPEARANCE_PROBABILITY_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getAppearanceProbability() <em>Appearance Probability</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getAppearanceProbability() |
| * @generated |
| * @ordered |
| */ |
| protected BigInteger appearanceProbability = APPEARANCE_PROBABILITY_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected ActivationImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return RTMGCPackage.Literals.ACTIVATION; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public BigInteger getAppearanceProbability() { |
| return appearanceProbability; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setAppearanceProbability(BigInteger newAppearanceProbability) { |
| BigInteger oldAppearanceProbability = appearanceProbability; |
| appearanceProbability = newAppearanceProbability; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, RTMGCPackage.ACTIVATION__APPEARANCE_PROBABILITY, oldAppearanceProbability, appearanceProbability)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case RTMGCPackage.ACTIVATION__APPEARANCE_PROBABILITY: |
| return getAppearanceProbability(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case RTMGCPackage.ACTIVATION__APPEARANCE_PROBABILITY: |
| setAppearanceProbability((BigInteger)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case RTMGCPackage.ACTIVATION__APPEARANCE_PROBABILITY: |
| setAppearanceProbability(APPEARANCE_PROBABILITY_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case RTMGCPackage.ACTIVATION__APPEARANCE_PROBABILITY: |
| return APPEARANCE_PROBABILITY_EDEFAULT == null ? appearanceProbability != null : !APPEARANCE_PROBABILITY_EDEFAULT.equals(appearanceProbability); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuffer result = new StringBuffer(super.toString()); |
| result.append(" (appearanceProbability: "); |
| result.append(appearanceProbability); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //ActivationImpl |