Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/MyEnumListImpl.java')
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/MyEnumListImpl.java170
1 files changed, 170 insertions, 0 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/MyEnumListImpl.java b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/MyEnumListImpl.java
new file mode 100644
index 0000000000..66e0eed44b
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.tests.model6/src/org/eclipse/emf/cdo/tests/model6/legacy/impl/MyEnumListImpl.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.emf.cdo.tests.model6.legacy.impl;
+
+import org.eclipse.emf.cdo.tests.model6.MyEnum;
+import org.eclipse.emf.cdo.tests.model6.MyEnumList;
+import org.eclipse.emf.cdo.tests.model6.legacy.Model6Package;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
+
+import java.util.Collection;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>My Enum List</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.emf.cdo.tests.model6.legacy.impl.MyEnumListImpl#getMyEnum <em>My Enum</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MyEnumListImpl extends EObjectImpl implements MyEnumList
+{
+ /**
+ * The cached value of the '{@link #getMyEnum() <em>My Enum</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMyEnum()
+ * @generated
+ * @ordered
+ */
+ protected EList<MyEnum> myEnum;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MyEnumListImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return Model6Package.eINSTANCE.getMyEnumList();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<MyEnum> getMyEnum()
+ {
+ if (myEnum == null)
+ {
+ myEnum = new EDataTypeUniqueEList<MyEnum>(MyEnum.class, this, Model6Package.MY_ENUM_LIST__MY_ENUM);
+ }
+ return myEnum;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case Model6Package.MY_ENUM_LIST__MY_ENUM:
+ return getMyEnum();
+ }
+ 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 Model6Package.MY_ENUM_LIST__MY_ENUM:
+ getMyEnum().clear();
+ getMyEnum().addAll((Collection<? extends MyEnum>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model6Package.MY_ENUM_LIST__MY_ENUM:
+ getMyEnum().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case Model6Package.MY_ENUM_LIST__MY_ENUM:
+ return myEnum != null && !myEnum.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(" (myEnum: ");
+ result.append(myEnum);
+ result.append(')');
+ return result.toString();
+ }
+
+} // MyEnumListImpl

Back to the top