| /** |
| * Copyright (c) 2017 CEA. |
| * 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: |
| * CEA - initial API and implementation and/or initial documentation |
| */ |
| /** |
| * generated by Xtext 2.9.1 |
| */ |
| package org.eclipse.sensinact.studio.language.sensinact.impl; |
| |
| import java.math.BigDecimal; |
| |
| 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; |
| |
| import org.eclipse.sensinact.studio.language.sensinact.DSL_CEP_DURATION_MIN; |
| import org.eclipse.sensinact.studio.language.sensinact.SensinactPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>DSL CEP DURATION MIN</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.sensinact.studio.language.sensinact.impl.DSL_CEP_DURATION_MINImpl#getMin <em>Min</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public class DSL_CEP_DURATION_MINImpl extends MinimalEObjectImpl.Container implements DSL_CEP_DURATION_MIN |
| { |
| /** |
| * The default value of the '{@link #getMin() <em>Min</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMin() |
| * @generated |
| * @ordered |
| */ |
| protected static final BigDecimal MIN_EDEFAULT = null; |
| |
| /** |
| * The cached value of the '{@link #getMin() <em>Min</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getMin() |
| * @generated |
| * @ordered |
| */ |
| protected BigDecimal min = MIN_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected DSL_CEP_DURATION_MINImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() |
| { |
| return SensinactPackage.Literals.DSL_CEP_DURATION_MIN; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public BigDecimal getMin() |
| { |
| return min; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void setMin(BigDecimal newMin) |
| { |
| BigDecimal oldMin = min; |
| min = newMin; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, SensinactPackage.DSL_CEP_DURATION_MIN__MIN, oldMin, min)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) |
| { |
| switch (featureID) |
| { |
| case SensinactPackage.DSL_CEP_DURATION_MIN__MIN: |
| return getMin(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) |
| { |
| switch (featureID) |
| { |
| case SensinactPackage.DSL_CEP_DURATION_MIN__MIN: |
| setMin((BigDecimal)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) |
| { |
| switch (featureID) |
| { |
| case SensinactPackage.DSL_CEP_DURATION_MIN__MIN: |
| setMin(MIN_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) |
| { |
| switch (featureID) |
| { |
| case SensinactPackage.DSL_CEP_DURATION_MIN__MIN: |
| return MIN_EDEFAULT == null ? min != null : !MIN_EDEFAULT.equals(min); |
| } |
| 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(" (min: "); |
| result.append(min); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //DSL_CEP_DURATION_MINImpl |