| /** |
| * 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.Pooling_layers.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.Pooling_layers.AdaptativeMaxPool; |
| import org.eclipse.papyrus.aiml.profile.AIML.Pooling_layers.Pooling_layersPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model object '<em><b>Adaptative Max Pool</b></em>'. |
| * <!-- end-user-doc --> |
| * <p> |
| * The following features are implemented: |
| * </p> |
| * <ul> |
| * <li>{@link org.eclipse.papyrus.aiml.profile.AIML.Pooling_layers.impl.AdaptativeMaxPoolImpl#isReturn_indices <em>Return indices</em>}</li> |
| * </ul> |
| * |
| * @generated |
| */ |
| public abstract class AdaptativeMaxPoolImpl extends Pooling_layers_2Impl implements AdaptativeMaxPool { |
| /** |
| * The default value of the '{@link #isReturn_indices() <em>Return indices</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isReturn_indices() |
| * @generated |
| * @ordered |
| */ |
| protected static final boolean RETURN_INDICES_EDEFAULT = false; |
| |
| /** |
| * The cached value of the '{@link #isReturn_indices() <em>Return indices</em>}' attribute. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #isReturn_indices() |
| * @generated |
| * @ordered |
| */ |
| protected boolean return_indices = RETURN_INDICES_EDEFAULT; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected AdaptativeMaxPoolImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| protected EClass eStaticClass() { |
| return Pooling_layersPackage.Literals.ADAPTATIVE_MAX_POOL; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean isReturn_indices() { |
| return return_indices; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void setReturn_indices(boolean newReturn_indices) { |
| boolean oldReturn_indices = return_indices; |
| return_indices = newReturn_indices; |
| if (eNotificationRequired()) |
| eNotify(new ENotificationImpl(this, Notification.SET, Pooling_layersPackage.ADAPTATIVE_MAX_POOL__RETURN_INDICES, oldReturn_indices, return_indices)); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public Object eGet(int featureID, boolean resolve, boolean coreType) { |
| switch (featureID) { |
| case Pooling_layersPackage.ADAPTATIVE_MAX_POOL__RETURN_INDICES: |
| return isReturn_indices(); |
| } |
| return super.eGet(featureID, resolve, coreType); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eSet(int featureID, Object newValue) { |
| switch (featureID) { |
| case Pooling_layersPackage.ADAPTATIVE_MAX_POOL__RETURN_INDICES: |
| setReturn_indices((Boolean)newValue); |
| return; |
| } |
| super.eSet(featureID, newValue); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public void eUnset(int featureID) { |
| switch (featureID) { |
| case Pooling_layersPackage.ADAPTATIVE_MAX_POOL__RETURN_INDICES: |
| setReturn_indices(RETURN_INDICES_EDEFAULT); |
| return; |
| } |
| super.eUnset(featureID); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public boolean eIsSet(int featureID) { |
| switch (featureID) { |
| case Pooling_layersPackage.ADAPTATIVE_MAX_POOL__RETURN_INDICES: |
| return return_indices != RETURN_INDICES_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(" (return_indices: "); //$NON-NLS-1$ |
| result.append(return_indices); |
| result.append(')'); |
| return result.toString(); |
| } |
| |
| } //AdaptativeMaxPoolImpl |