/******************************************************************************* * Copyright (c) 2010 Michal Antkiewicz. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Michal Antkiewicz - initial API and implementation ******************************************************************************/ /** * * * * $Id: ShowsStatusImpl.java,v 1.7 2008/02/21 20:09:37 Michal Antkiewicz <mantkiew@gsd.uwaterloo.ca> $ */ package ca.uwaterloo.gsd.applet.impl; import java.util.Collection; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.util.EDataTypeUniqueEList; import ca.uwaterloo.gsd.applet.AppletPackage; import ca.uwaterloo.gsd.applet.ShowsStatus; import ca.uwaterloo.gsd.fsml.fsml.impl.ConceptImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Shows Status</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * <ul> * <li>{@link ca.uwaterloo.gsd.applet.impl.ShowsStatusImpl#getMessage <em>Message</em>}</li> * </ul> * </p> * * @generated */ public class ShowsStatusImpl extends ConceptImpl implements ShowsStatus { /** * The cached value of the '{@link #getMessage() <em>Message</em>}' attribute list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getMessage() * @generated * @ordered */ protected EList<String> message; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ShowsStatusImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return AppletPackage.Literals.SHOWS_STATUS; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<String> getMessage() { if (message == null) { message = new EDataTypeUniqueEList<String>(String.class, this, AppletPackage.SHOWS_STATUS__MESSAGE); } return message; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AppletPackage.SHOWS_STATUS__MESSAGE: return getMessage(); } 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 AppletPackage.SHOWS_STATUS__MESSAGE: getMessage().clear(); getMessage().addAll((Collection<? extends String>)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case AppletPackage.SHOWS_STATUS__MESSAGE: getMessage().clear(); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case AppletPackage.SHOWS_STATUS__MESSAGE: return message != null && !message.isEmpty(); } 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(" (message: "); result.append(message); result.append(')'); return result.toString(); } } //ShowsStatusImpl