| /*=============================================================================# |
| # Copyright (c) 2012, 2021 Stephan Wahlbrink and others. |
| # |
| # This program and the accompanying materials are made available under the |
| # terms of the Eclipse Public License 2.0 which is available at |
| # https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0 |
| # which is available at https://www.apache.org/licenses/LICENSE-2.0. |
| # |
| # SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 |
| # |
| # Contributors: |
| # Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation |
| #=============================================================================*/ |
| |
| package org.eclipse.statet.rtm.ggplot.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.statet.rtm.ggplot.GGPlotPackage; |
| import org.eclipse.statet.rtm.ggplot.SummaryStat; |
| import org.eclipse.statet.rtm.rtdata.types.RTypedExpr; |
| |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Summary Stat</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * <ul> |
| * <li>{@link org.eclipse.statet.rtm.ggplot.impl.SummaryStatImpl#getYFun <em>YFun</em>}</li> |
| * </ul> |
| * </p> |
| * |
| * @generated |
| */ |
| public class SummaryStatImpl extends StatImpl implements SummaryStat { |
| /** |
| * The default value of the '{@link #getYFun() <em>YFun</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getYFun() |
| * @generated |
| * @ordered |
| */ |
| protected static final RTypedExpr YFUN_EDEFAULT= null; |
| |
| /** |
| * The cached value of the '{@link #getYFun() <em>YFun</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getYFun() |
| * @generated |
| * @ordered |
| */ |
| protected RTypedExpr yFun= YFUN_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected SummaryStatImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return GGPlotPackage.Literals.SUMMARY_STAT; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public RTypedExpr getYFun() { |
| return this.yFun; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setYFun(final RTypedExpr newYFun) { |
| final RTypedExpr oldYFun= this.yFun; |
| this.yFun= newYFun; |
| if (eNotificationRequired()) { |
| eNotify(new ENotificationImpl(this, Notification.SET, GGPlotPackage.SUMMARY_STAT__YFUN, oldYFun, this.yFun)); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(final int featureID, final boolean resolve, final boolean coreType) { |
| switch (featureID) { |
| case GGPlotPackage.SUMMARY_STAT__YFUN: |
| return getYFun(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(final int featureID, final Object newValue) { |
| switch (featureID) { |
| case GGPlotPackage.SUMMARY_STAT__YFUN: |
| setYFun((RTypedExpr)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(final int featureID) { |
| switch (featureID) { |
| case GGPlotPackage.SUMMARY_STAT__YFUN: |
| setYFun(YFUN_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(final int featureID) { |
| switch (featureID) { |
| case GGPlotPackage.SUMMARY_STAT__YFUN: |
| return YFUN_EDEFAULT == null ? this.yFun != null : !YFUN_EDEFAULT.equals(this.yFun); |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) { |
| return super.toString(); |
| } |
| |
| final StringBuffer result= new StringBuffer(super.toString()); |
| result.append(" (yFun: "); //$NON-NLS-1$ |
| result.append(this.yFun); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //SummaryStatImpl |