Skip to content

Package: VCategorizationImpl

VCategorizationImpl

nameinstructionbranchcomplexitylinemethod
VCategorizationImpl()
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: 0 C: 17
100%
M: 0 C: 6
100%
M: 0 C: 4
100%
M: 0 C: 3
100%
M: 0 C: 1
100%
eSet(int, Object)
M: 10 C: 7
41%
M: 1 C: 1
50%
M: 1 C: 1
50%
M: 3 C: 3
50%
M: 0 C: 1
100%
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%
getCategorizations()
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-2013 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: * EclipseSource Munich - initial API and implementation
13: */
14: package org.eclipse.emf.ecp.view.spi.categorization.model.impl;
15:
16: import java.util.Collection;
17:
18: import org.eclipse.emf.common.notify.NotificationChain;
19: import org.eclipse.emf.common.util.EList;
20: import org.eclipse.emf.ecore.EClass;
21: import org.eclipse.emf.ecore.InternalEObject;
22: import org.eclipse.emf.ecore.util.EObjectContainmentEList;
23: import org.eclipse.emf.ecore.util.InternalEList;
24: import org.eclipse.emf.ecp.view.spi.categorization.model.VAbstractCategorization;
25: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorization;
26: import org.eclipse.emf.ecp.view.spi.categorization.model.VCategorizationPackage;
27:
28: /**
29: * <!-- begin-user-doc -->
30: * An implementation of the model object '<em><b>Categorization</b></em>'.
31: * <!-- end-user-doc -->
32: * <p>
33: * The following features are implemented:
34: * </p>
35: * <ul>
36: * <li>{@link org.eclipse.emf.ecp.view.spi.categorization.model.impl.VCategorizationImpl#getCategorizations
37: * <em>Categorizations</em>}</li>
38: * </ul>
39: *
40: * @generated
41: */
42: public class VCategorizationImpl extends VAbstractCategorizationImpl implements VCategorization {
43:         /**
44:          * The cached value of the '{@link #getCategorizations() <em>Categorizations</em>}' containment reference list.
45:          * <!-- begin-user-doc -->
46:          * <!-- end-user-doc -->
47:          *
48:          * @see #getCategorizations()
49:          * @generated
50:          * @ordered
51:          */
52:         protected EList<VAbstractCategorization> categorizations;
53:
54:         /**
55:          * <!-- begin-user-doc -->
56:          * <!-- end-user-doc -->
57:          *
58:          * @generated
59:          */
60:         protected VCategorizationImpl() {
61:                 super();
62:         }
63:
64:         /**
65:          * <!-- begin-user-doc -->
66:          * <!-- end-user-doc -->
67:          *
68:          * @generated
69:          */
70:         @Override
71:         protected EClass eStaticClass() {
72:                 return VCategorizationPackage.Literals.CATEGORIZATION;
73:         }
74:
75:         /**
76:          * <!-- begin-user-doc -->
77:          * <!-- end-user-doc -->
78:          *
79:          * @generated
80:          */
81:         @Override
82:         public EList<VAbstractCategorization> getCategorizations() {
83:•                if (categorizations == null) {
84:                         categorizations = new EObjectContainmentEList<VAbstractCategorization>(VAbstractCategorization.class, this,
85:                                 VCategorizationPackage.CATEGORIZATION__CATEGORIZATIONS);
86:                 }
87:                 return categorizations;
88:         }
89:
90:         /**
91:          * <!-- begin-user-doc -->
92:          * <!-- end-user-doc -->
93:          *
94:          * @generated
95:          */
96:         @Override
97:         public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
98:•                switch (featureID) {
99:                 case VCategorizationPackage.CATEGORIZATION__CATEGORIZATIONS:
100:                         return ((InternalEList<?>) getCategorizations()).basicRemove(otherEnd, msgs);
101:                 }
102:                 return super.eInverseRemove(otherEnd, featureID, msgs);
103:         }
104:
105:         /**
106:          * <!-- begin-user-doc -->
107:          * <!-- end-user-doc -->
108:          *
109:          * @generated
110:          */
111:         @Override
112:         public Object eGet(int featureID, boolean resolve, boolean coreType) {
113:•                switch (featureID) {
114:                 case VCategorizationPackage.CATEGORIZATION__CATEGORIZATIONS:
115:                         return getCategorizations();
116:                 }
117:                 return super.eGet(featureID, resolve, coreType);
118:         }
119:
120:         /**
121:          * <!-- begin-user-doc -->
122:          * <!-- end-user-doc -->
123:          *
124:          * @generated
125:          */
126:         @SuppressWarnings("unchecked")
127:         @Override
128:         public void eSet(int featureID, Object newValue) {
129:•                switch (featureID) {
130:                 case VCategorizationPackage.CATEGORIZATION__CATEGORIZATIONS:
131:                         getCategorizations().clear();
132:                         getCategorizations().addAll((Collection<? extends VAbstractCategorization>) newValue);
133:                         return;
134:                 }
135:                 super.eSet(featureID, newValue);
136:         }
137:
138:         /**
139:          * <!-- begin-user-doc -->
140:          * <!-- end-user-doc -->
141:          *
142:          * @generated
143:          */
144:         @Override
145:         public void eUnset(int featureID) {
146:•                switch (featureID) {
147:                 case VCategorizationPackage.CATEGORIZATION__CATEGORIZATIONS:
148:                         getCategorizations().clear();
149:                         return;
150:                 }
151:                 super.eUnset(featureID);
152:         }
153:
154:         /**
155:          * <!-- begin-user-doc -->
156:          * <!-- end-user-doc -->
157:          *
158:          * @generated
159:          */
160:         @Override
161:         public boolean eIsSet(int featureID) {
162:•                switch (featureID) {
163:                 case VCategorizationPackage.CATEGORIZATION__CATEGORIZATIONS:
164:•                        return categorizations != null && !categorizations.isEmpty();
165:                 }
166:                 return super.eIsSet(featureID);
167:         }
168:
169: } // VCategorizationImpl