EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.probfunction.impl]

COVERAGE SUMMARY FOR SOURCE FILE [ProbabilityMassFunctionImpl.java]

nameclass, %method, %block, %line, %
ProbabilityMassFunctionImpl.java100% (1/1)36%  (4/11)20%  (33/161)24%  (11/45)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ProbabilityMassFunctionImpl100% (1/1)36%  (4/11)20%  (33/161)24%  (11/45)
eGet (int, boolean, boolean): Object 0%   (0/1)0%   (0/15)0%   (0/4)
eInverseRemove (InternalEObject, int, NotificationChain): NotificationChain 0%   (0/1)0%   (0/15)0%   (0/3)
eIsSet (int): boolean 0%   (0/1)0%   (0/20)0%   (0/4)
eSet (int, Object): void 0%   (0/1)0%   (0/23)0%   (0/8)
eStaticClass (): EClass 0%   (0/1)0%   (0/2)0%   (0/1)
eUnset (int): void 0%   (0/1)0%   (0/14)0%   (0/7)
toString (): String 0%   (0/1)0%   (0/28)0%   (0/6)
setOrderedDomain (boolean): void 100% (1/1)48%  (10/21)80%  (4/5)
ProbabilityMassFunctionImpl (): void 100% (1/1)100% (6/6)100% (3/3)
getSamples (): EList 100% (1/1)100% (14/14)100% (3/3)
isOrderedDomain (): boolean 100% (1/1)100% (3/3)100% (1/1)

1/**
2 * <copyright>
3 * </copyright>
4 *
5 * $Id$
6 */
7package de.uka.ipd.sdq.probfunction.impl;
8 
9import java.util.Collection;
10 
11import org.eclipse.emf.common.notify.Notification;
12import org.eclipse.emf.common.notify.NotificationChain;
13import org.eclipse.emf.common.util.EList;
14import org.eclipse.emf.ecore.EClass;
15import org.eclipse.emf.ecore.InternalEObject;
16import org.eclipse.emf.ecore.impl.ENotificationImpl;
17import org.eclipse.emf.ecore.util.EObjectContainmentEList;
18import org.eclipse.emf.ecore.util.InternalEList;
19 
20import de.uka.ipd.sdq.probfunction.ProbabilityMassFunction;
21import de.uka.ipd.sdq.probfunction.ProbfunctionPackage;
22import de.uka.ipd.sdq.probfunction.Sample;
23 
24/**
25 * <!-- begin-user-doc -->
26 * An implementation of the model object '<em><b>Probability Mass Function</b></em>'.
27 * <!-- end-user-doc -->
28 * <p>
29 * The following features are implemented:
30 * <ul>
31 *   <li>{@link de.uka.ipd.sdq.probfunction.impl.ProbabilityMassFunctionImpl#getSamples <em>Samples</em>}</li>
32 *   <li>{@link de.uka.ipd.sdq.probfunction.impl.ProbabilityMassFunctionImpl#isOrderedDomain <em>Ordered Domain</em>}</li>
33 * </ul>
34 * </p>
35 *
36 * @generated
37 */
38public class ProbabilityMassFunctionImpl extends ProbabilityFunctionImpl implements ProbabilityMassFunction {
39        /**
40         * <!-- begin-user-doc -->
41         * <!-- end-user-doc -->
42         * @generated
43         */
44        public static final String copyright = "Copyright 2007-2009, SDQ, IPD, U Karlsruhe";
45 
46        /**
47         * The cached value of the '{@link #getSamples() <em>Samples</em>}' containment reference list.
48         * <!-- begin-user-doc -->
49         * <!-- end-user-doc -->
50         * @see #getSamples()
51         * @generated
52         * @ordered
53         */
54        protected EList<Sample> samples;
55 
56        /**
57         * The default value of the '{@link #isOrderedDomain() <em>Ordered Domain</em>}' attribute.
58         * <!-- begin-user-doc -->
59         * <!-- end-user-doc -->
60         * @see #isOrderedDomain()
61         * @generated
62         * @ordered
63         */
64        protected static final boolean ORDERED_DOMAIN_EDEFAULT = false;
65 
66        /**
67         * The cached value of the '{@link #isOrderedDomain() <em>Ordered Domain</em>}' attribute.
68         * <!-- begin-user-doc -->
69         * <!-- end-user-doc -->
70         * @see #isOrderedDomain()
71         * @generated
72         * @ordered
73         */
74        protected boolean orderedDomain = ORDERED_DOMAIN_EDEFAULT;
75 
76        /**
77         * <!-- begin-user-doc -->
78         * <!-- end-user-doc -->
79         * @generated
80         */
81        protected ProbabilityMassFunctionImpl() {
82                super();
83        }
84 
85        /**
86         * <!-- begin-user-doc -->
87         * <!-- end-user-doc -->
88         * @generated
89         */
90        @Override
91        protected EClass eStaticClass() {
92                return ProbfunctionPackage.Literals.PROBABILITY_MASS_FUNCTION;
93        }
94 
95        /**
96         * <!-- begin-user-doc -->
97         * <!-- end-user-doc -->
98         * @generated
99         */
100        public EList<Sample> getSamples() {
101                if (samples == null) {
102                        samples = new EObjectContainmentEList<Sample>(Sample.class, this, ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__SAMPLES);
103                }
104                return samples;
105        }
106 
107        /**
108         * <!-- begin-user-doc -->
109         * <!-- end-user-doc -->
110         * @generated
111         */
112        public boolean isOrderedDomain() {
113                return orderedDomain;
114        }
115 
116        /**
117         * <!-- begin-user-doc -->
118         * <!-- end-user-doc -->
119         * @generated
120         */
121        public void setOrderedDomain(boolean newOrderedDomain) {
122                boolean oldOrderedDomain = orderedDomain;
123                orderedDomain = newOrderedDomain;
124                if (eNotificationRequired())
125                        eNotify(new ENotificationImpl(this, Notification.SET, ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__ORDERED_DOMAIN, oldOrderedDomain, orderedDomain));
126        }
127 
128        /**
129         * <!-- begin-user-doc -->
130         * <!-- end-user-doc -->
131         * @generated
132         */
133        @Override
134        public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
135                switch (featureID) {
136                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__SAMPLES:
137                                return ((InternalEList<?>)getSamples()).basicRemove(otherEnd, msgs);
138                }
139                return super.eInverseRemove(otherEnd, featureID, msgs);
140        }
141 
142        /**
143         * <!-- begin-user-doc -->
144         * <!-- end-user-doc -->
145         * @generated
146         */
147        @Override
148        public Object eGet(int featureID, boolean resolve, boolean coreType) {
149                switch (featureID) {
150                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__SAMPLES:
151                                return getSamples();
152                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__ORDERED_DOMAIN:
153                                return isOrderedDomain();
154                }
155                return super.eGet(featureID, resolve, coreType);
156        }
157 
158        /**
159         * <!-- begin-user-doc -->
160         * <!-- end-user-doc -->
161         * @generated
162         */
163        @SuppressWarnings("unchecked")
164        @Override
165        public void eSet(int featureID, Object newValue) {
166                switch (featureID) {
167                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__SAMPLES:
168                                getSamples().clear();
169                                getSamples().addAll((Collection<? extends Sample>)newValue);
170                                return;
171                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__ORDERED_DOMAIN:
172                                setOrderedDomain((Boolean)newValue);
173                                return;
174                }
175                super.eSet(featureID, newValue);
176        }
177 
178        /**
179         * <!-- begin-user-doc -->
180         * <!-- end-user-doc -->
181         * @generated
182         */
183        @Override
184        public void eUnset(int featureID) {
185                switch (featureID) {
186                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__SAMPLES:
187                                getSamples().clear();
188                                return;
189                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__ORDERED_DOMAIN:
190                                setOrderedDomain(ORDERED_DOMAIN_EDEFAULT);
191                                return;
192                }
193                super.eUnset(featureID);
194        }
195 
196        /**
197         * <!-- begin-user-doc -->
198         * <!-- end-user-doc -->
199         * @generated
200         */
201        @Override
202        public boolean eIsSet(int featureID) {
203                switch (featureID) {
204                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__SAMPLES:
205                                return samples != null && !samples.isEmpty();
206                        case ProbfunctionPackage.PROBABILITY_MASS_FUNCTION__ORDERED_DOMAIN:
207                                return orderedDomain != ORDERED_DOMAIN_EDEFAULT;
208                }
209                return super.eIsSet(featureID);
210        }
211 
212        /**
213         * <!-- begin-user-doc -->
214         * <!-- end-user-doc -->
215         * @generated
216         */
217        @Override
218        public String toString() {
219                if (eIsProxy()) return super.toString();
220 
221                StringBuffer result = new StringBuffer(super.toString());
222                result.append(" (orderedDomain: ");
223                result.append(orderedDomain);
224                result.append(')');
225                return result.toString();
226        }
227 
228} //ProbabilityMassFunctionImpl

[all classes][de.uka.ipd.sdq.probfunction.impl]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov