Skip to content

Package: TableWithoutMultiplicityConcreteImpl

TableWithoutMultiplicityConcreteImpl

nameinstructionbranchcomplexitylinemethod
TableWithoutMultiplicityConcreteImpl()
M: 0 C: 3
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 2
100%
M: 0 C: 1
100%
eGet(int, boolean, boolean)
M: 0 C: 11
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
eInverseRemove(InternalEObject, int, NotificationChain)
M: 15 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 3 C: 0
0%
M: 1 C: 0
0%
eIsSet(int)
M: 2 C: 15
88%
M: 2 C: 4
67%
M: 2 C: 2
50%
M: 0 C: 3
100%
M: 0 C: 1
100%
eSet(int, Object)
M: 17 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 6 C: 0
0%
M: 1 C: 0
0%
eStaticClass()
M: 0 C: 2
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
M: 0 C: 1
100%
eUnset(int)
M: 10 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getContent()
M: 0 C: 14
100%
M: 0 C: 2
100%
M: 0 C: 2
100%
M: 0 C: 4
100%
M: 0 C: 1
100%

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2011-2019 EclipseSource Muenchen GmbH and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Eugen Neufeld - initial API and implementation
13: * Christian W. Damus - bug 543190
14: *******************************************************************************/
15:
16: package org.eclipse.emf.ecp.view.validation.test.model.impl;
17:
18: import java.util.Collection;
19:
20: import org.eclipse.emf.common.notify.NotificationChain;
21: import org.eclipse.emf.common.util.EList;
22: import org.eclipse.emf.ecore.EClass;
23: import org.eclipse.emf.ecore.InternalEObject;
24: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
25: import org.eclipse.emf.ecore.util.InternalEList;
26: import org.eclipse.emf.ecp.view.validation.test.model.TableContentWithInnerChild;
27: import org.eclipse.emf.ecp.view.validation.test.model.TableWithoutMultiplicityConcrete;
28: import org.eclipse.emf.ecp.view.validation.test.model.TestPackage;
29:
30: /**
31: * <!-- begin-user-doc -->
32: * An implementation of the model object '<em><b>Table Without Multiplicity Concrete</b></em>'.
33: * <!-- end-user-doc -->
34: * <p>
35: * The following features are implemented:
36: * </p>
37: * <ul>
38: * <li>{@link org.eclipse.emf.ecp.view.validation.test.model.impl.TableWithoutMultiplicityConcreteImpl#getContent
39: * <em>Content</em>}</li>
40: * </ul>
41: *
42: * @generated
43: */
44: public class TableWithoutMultiplicityConcreteImpl extends TableObjectImpl implements TableWithoutMultiplicityConcrete {
45:         /**
46:          * The cached value of the '{@link #getContent() <em>Content</em>}' containment reference list.
47:          * <!-- begin-user-doc -->
48:          * <!-- end-user-doc -->
49:          *
50:          * @see #getContent()
51:          * @generated
52:          * @ordered
53:          */
54:         protected EList<TableContentWithInnerChild> content;
55:
56:         /**
57:          * <!-- begin-user-doc -->
58:          * <!-- end-user-doc -->
59:          *
60:          * @generated
61:          */
62:         protected TableWithoutMultiplicityConcreteImpl() {
63:                 super();
64:         }
65:
66:         /**
67:          * <!-- begin-user-doc -->
68:          * <!-- end-user-doc -->
69:          *
70:          * @generated
71:          */
72:         @Override
73:         protected EClass eStaticClass() {
74:                 return TestPackage.Literals.TABLE_WITHOUT_MULTIPLICITY_CONCRETE;
75:         }
76:
77:         /**
78:          * <!-- begin-user-doc -->
79:          * <!-- end-user-doc -->
80:          *
81:          * @generated
82:          */
83:         @Override
84:         public EList<TableContentWithInnerChild> getContent() {
85:•                if (content == null) {
86:                         content = new EObjectContainmentEList<>(TableContentWithInnerChild.class, this,
87:                                 TestPackage.TABLE_WITHOUT_MULTIPLICITY_CONCRETE__CONTENT);
88:                 }
89:                 return content;
90:         }
91:
92:         /**
93:          * <!-- begin-user-doc -->
94:          * <!-- end-user-doc -->
95:          *
96:          * @generated
97:          */
98:         @Override
99:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
100:•                switch (featureID) {
101:                 case TestPackage.TABLE_WITHOUT_MULTIPLICITY_CONCRETE__CONTENT:
102:                         return ((InternalEList<?>) getContent()).basicRemove(otherEnd, msgs);
103:                 }
104:                 return super.eInverseRemove(otherEnd, featureID, msgs);
105:         }
106:
107:         /**
108:          * <!-- begin-user-doc -->
109:          * <!-- end-user-doc -->
110:          *
111:          * @generated
112:          */
113:         @Override
114:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
115:•                switch (featureID) {
116:                 case TestPackage.TABLE_WITHOUT_MULTIPLICITY_CONCRETE__CONTENT:
117:                         return getContent();
118:                 }
119:                 return super.eGet(featureID, resolve, coreType);
120:         }
121:
122:         /**
123:          * <!-- begin-user-doc -->
124:          * <!-- end-user-doc -->
125:          *
126:          * @generated
127:          */
128:         @SuppressWarnings("unchecked")
129:         @Override
130:         public void eSet(int featureID, Object newValue) {
131:•                switch (featureID) {
132:                 case TestPackage.TABLE_WITHOUT_MULTIPLICITY_CONCRETE__CONTENT:
133:                         getContent().clear();
134:                         getContent().addAll((Collection<? extends TableContentWithInnerChild>) newValue);
135:                         return;
136:                 }
137:                 super.eSet(featureID, newValue);
138:         }
139:
140:         /**
141:          * <!-- begin-user-doc -->
142:          * <!-- end-user-doc -->
143:          *
144:          * @generated
145:          */
146:         @Override
147:         public void eUnset(int featureID) {
148:•                switch (featureID) {
149:                 case TestPackage.TABLE_WITHOUT_MULTIPLICITY_CONCRETE__CONTENT:
150:                         getContent().clear();
151:                         return;
152:                 }
153:                 super.eUnset(featureID);
154:         }
155:
156:         /**
157:          * <!-- begin-user-doc -->
158:          * <!-- end-user-doc -->
159:          *
160:          * @generated
161:          */
162:         @Override
163:         public boolean eIsSet(int featureID) {
164:•                switch (featureID) {
165:                 case TestPackage.TABLE_WITHOUT_MULTIPLICITY_CONCRETE__CONTENT:
166:•                        return content != null && !content.isEmpty();
167:                 }
168:                 return super.eIsSet(featureID);
169:         }
170:
171: } // TableWithoutMultiplicityConcreteImpl