| /** |
| * Copyright (c) 2020 CEA LIST |
| * |
| * All rights reserved. This program and the accompanying materials are |
| * made available under the terms of the Eclipse Public License v2.0 which |
| * accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| */ |
| package org.eclipse.papyrus.aiml.profile.AIML.Loss_functions.impl; |
| |
| import org.eclipse.emf.common.notify.Notification; |
| |
| import org.eclipse.emf.ecore.EClass; |
| |
| import org.eclipse.emf.ecore.impl.ENotificationImpl; |
| |
| import org.eclipse.papyrus.aiml.profile.AIML.Loss_functions.Loss_functionsPackage; |
| import org.eclipse.papyrus.aiml.profile.AIML.Loss_functions.Loss_functions_1_2_1; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Loss functions 121</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.aiml.profile.AIML.Loss_functions.impl.Loss_functions_1_2_1Impl#getIgnore_index <em>Ignore index</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public abstract class Loss_functions_1_2_1Impl extends Loss_functions_1_2Impl implements Loss_functions_1_2_1 { |
| /** |
| * The default value of the '{@link #getIgnore_index() <em>Ignore index</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIgnore_index() |
| * @generated |
| * @ordered |
| */ |
| protected static final int IGNORE_INDEX_EDEFAULT = 0; |
| |
| /** |
| * The cached value of the '{@link #getIgnore_index() <em>Ignore index</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #getIgnore_index() |
| * @generated |
| * @ordered |
| */ |
| protected int ignore_index = IGNORE_INDEX_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected Loss_functions_1_2_1Impl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return Loss_functionsPackage.Literals.LOSS_FUNCTIONS_121; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public int getIgnore_index() { |
| return ignore_index; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setIgnore_index(int newIgnore_index) { |
| int oldIgnore_index = ignore_index; |
| ignore_index = newIgnore_index; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, Loss_functionsPackage.LOSS_FUNCTIONS_121__IGNORE_INDEX, oldIgnore_index, ignore_index)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case Loss_functionsPackage.LOSS_FUNCTIONS_121__IGNORE_INDEX: |
| return getIgnore_index(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case Loss_functionsPackage.LOSS_FUNCTIONS_121__IGNORE_INDEX: |
| setIgnore_index((Integer)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case Loss_functionsPackage.LOSS_FUNCTIONS_121__IGNORE_INDEX: |
| setIgnore_index(IGNORE_INDEX_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case Loss_functionsPackage.LOSS_FUNCTIONS_121__IGNORE_INDEX: |
| return ignore_index != IGNORE_INDEX_EDEFAULT; |
| } |
| return super.eIsSet(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| if (eIsProxy()) return super.toString(); |
| |
| StringBuilder result = new StringBuilder(super.toString()); |
| result.append(" (ignore_index: "); //$NON-NLS-1$ |
| result.append(ignore_index); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //Loss_functions_1_2_1Impl |