--- a
+++ b/src/main/java/genericbcm/impl/MultiClusterImpl.java
@@ -0,0 +1,221 @@
+/**
+ */
+package genericbcm.impl;
+
+import genericbcm.GenericbcmPackage;
+import genericbcm.MultiCluster;
+import genericbcm.Unit;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+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.impl.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Multi Cluster</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link genericbcm.impl.MultiClusterImpl#getMultiplicity <em>Multiplicity</em>}</li>
+ * <li>{@link genericbcm.impl.MultiClusterImpl#getUnits <em>Units</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MultiClusterImpl extends NameableImpl implements MultiCluster {
+ /**
+ * The default value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMultiplicity()
+ * @generated
+ * @ordered
+ */
+ protected static final int MULTIPLICITY_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getMultiplicity() <em>Multiplicity</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMultiplicity()
+ * @generated
+ * @ordered
+ */
+ protected int multiplicity = MULTIPLICITY_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getUnits() <em>Units</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getUnits()
+ * @generated
+ * @ordered
+ */
+ protected EList<Unit> units;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MultiClusterImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GenericbcmPackage.Literals.MULTI_CLUSTER;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public int getMultiplicity() {
+ return multiplicity;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMultiplicity(int newMultiplicity) {
+ int oldMultiplicity = multiplicity;
+ multiplicity = newMultiplicity;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GenericbcmPackage.MULTI_CLUSTER__MULTIPLICITY, oldMultiplicity, multiplicity));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Unit> getUnits() {
+ if (units == null) {
+ units = new EObjectContainmentEList<Unit>(Unit.class, this, GenericbcmPackage.MULTI_CLUSTER__UNITS);
+ }
+ return units;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GenericbcmPackage.MULTI_CLUSTER__UNITS:
+ return ((InternalEList<?>)getUnits()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GenericbcmPackage.MULTI_CLUSTER__MULTIPLICITY:
+ return getMultiplicity();
+ case GenericbcmPackage.MULTI_CLUSTER__UNITS:
+ return getUnits();
+ }
+ 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 GenericbcmPackage.MULTI_CLUSTER__MULTIPLICITY:
+ setMultiplicity((Integer)newValue);
+ return;
+ case GenericbcmPackage.MULTI_CLUSTER__UNITS:
+ getUnits().clear();
+ getUnits().addAll((Collection<? extends Unit>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GenericbcmPackage.MULTI_CLUSTER__MULTIPLICITY:
+ setMultiplicity(MULTIPLICITY_EDEFAULT);
+ return;
+ case GenericbcmPackage.MULTI_CLUSTER__UNITS:
+ getUnits().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GenericbcmPackage.MULTI_CLUSTER__MULTIPLICITY:
+ return multiplicity != MULTIPLICITY_EDEFAULT;
+ case GenericbcmPackage.MULTI_CLUSTER__UNITS:
+ return units != null && !units.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(" (multiplicity: ");
+ result.append(multiplicity);
+ result.append(')');
+ return result.toString();
+ }
+
+} //MultiClusterImpl