blob: bc65d817f1257099a176e3c8d5834d0894a72e1d [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.Goalie;
import org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.GoalieStats;
import org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.HockeyleaguePackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Goalie</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.impl.GoalieImpl#getGoalieStats <em>Goalie Stats</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class GoalieImpl extends PlayerImpl implements Goalie {
/**
* The cached value of the '{@link #getGoalieStats() <em>Goalie Stats</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getGoalieStats()
* @generated
* @ordered
*/
protected EList goalieStats = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected GoalieImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EClass eStaticClass() {
return HockeyleaguePackage.Literals.GOALIE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList getGoalieStats() {
if (goalieStats == null) {
goalieStats = new EObjectContainmentEList(GoalieStats.class, this, HockeyleaguePackage.GOALIE__GOALIE_STATS);
}
return goalieStats;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case HockeyleaguePackage.GOALIE__GOALIE_STATS:
return ((InternalEList)getGoalieStats()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case HockeyleaguePackage.GOALIE__GOALIE_STATS:
return getGoalieStats();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case HockeyleaguePackage.GOALIE__GOALIE_STATS:
getGoalieStats().clear();
getGoalieStats().addAll((Collection)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void eUnset(int featureID) {
switch (featureID) {
case HockeyleaguePackage.GOALIE__GOALIE_STATS:
getGoalieStats().clear();
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean eIsSet(int featureID) {
switch (featureID) {
case HockeyleaguePackage.GOALIE__GOALIE_STATS:
return goalieStats != null && !goalieStats.isEmpty();
}
return super.eIsSet(featureID);
}
} //GoalieImpl