/** */ package net.certware.hazard.stpa.hazardAnalysis.impl; import net.certware.hazard.stpa.hazardAnalysis.Control; import net.certware.hazard.stpa.hazardAnalysis.HazardAnalysisPackage; 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; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Control</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link net.certware.hazard.stpa.hazardAnalysis.impl.ControlImpl#getControl <em>Control</em>}</li> * </ul> * </p> * * @generated */ public class ControlImpl extends MinimalEObjectImpl.Container implements Control { /** * The default value of the '{@link #getControl() <em>Control</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getControl() * @generated * @ordered */ protected static final String CONTROL_EDEFAULT = null; /** * The cached value of the '{@link #getControl() <em>Control</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getControl() * @generated * @ordered */ protected String control = CONTROL_EDEFAULT; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ControlImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return HazardAnalysisPackage.Literals.CONTROL; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getControl() { return control; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setControl(String newControl) { String oldControl = control; control = newControl; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, HazardAnalysisPackage.CONTROL__CONTROL, oldControl, control)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case HazardAnalysisPackage.CONTROL__CONTROL: return getControl(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case HazardAnalysisPackage.CONTROL__CONTROL: setControl((String)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case HazardAnalysisPackage.CONTROL__CONTROL: setControl(CONTROL_EDEFAULT); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case HazardAnalysisPackage.CONTROL__CONTROL: return CONTROL_EDEFAULT == null ? control != null : !CONTROL_EDEFAULT.equals(control); } 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(" (control: "); result.append(control); result.append(')'); return result.toString(); } } //ControlImpl