blob: 652460260719c5e0e286c9a5a11ce2fc85987cb1 [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2011 - 2014 University of Padova, Intecs
*
*
* 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
* http://www.eclipse.org/legal/epl-v20.html
*
*
*****************************************************************************/
package org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
import org.eclipse.papyrus.MARTE.MARTE_DesignModel.HRM.HwLogical.HwComputing.impl.HwProcessorImpl;
import org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.CH_HwProcessor;
import org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.HardwareBaselinePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>CH Hw Processor</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.polarsys.chess.chessmlprofile.Predictability.DeploymentConfiguration.HardwareBaseline.impl.CH_HwProcessorImpl#getUtilization <em>Utilization</em>}</li>
* </ul>
*
* @generated
*/
public class CH_HwProcessorImpl extends HwProcessorImpl implements CH_HwProcessor {
/**
* The default value of the '{@link #getUtilization() <em>Utilization</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUtilization()
* @generated
* @ordered
*/
protected static final String UTILIZATION_EDEFAULT = null;
/**
* The cached value of the '{@link #getUtilization() <em>Utilization</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getUtilization()
* @generated
* @ordered
*/
protected String utilization = UTILIZATION_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CH_HwProcessorImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return HardwareBaselinePackage.Literals.CH_HW_PROCESSOR;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getUtilization() {
return utilization;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setUtilization(String newUtilization) {
String oldUtilization = utilization;
utilization = newUtilization;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, HardwareBaselinePackage.CH_HW_PROCESSOR__UTILIZATION, oldUtilization, utilization));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case HardwareBaselinePackage.CH_HW_PROCESSOR__UTILIZATION:
return getUtilization();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case HardwareBaselinePackage.CH_HW_PROCESSOR__UTILIZATION:
setUtilization((String)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case HardwareBaselinePackage.CH_HW_PROCESSOR__UTILIZATION:
setUtilization(UTILIZATION_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case HardwareBaselinePackage.CH_HW_PROCESSOR__UTILIZATION:
return UTILIZATION_EDEFAULT == null ? utilization != null : !UTILIZATION_EDEFAULT.equals(utilization);
}
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(" (utilization: ");
result.append(utilization);
result.append(')');
return result.toString();
}
} //CH_HwProcessorImpl