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

COVERAGE SUMMARY FOR SOURCE FILE [VariableUsageWrapper.java]

nameclass, %method, %block, %line, %
VariableUsageWrapper.java0%   (0/1)0%   (0/9)0%   (0/76)0%   (0/23)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VariableUsageWrapper0%   (0/1)0%   (0/9)0%   (0/76)0%   (0/23)
VariableUsageWrapper (): void 0%   (0/1)0%   (0/9)0%   (0/4)
VariableUsageWrapper (VariableUsage): void 0%   (0/1)0%   (0/12)0%   (0/5)
VariableUsageWrapper (VariableUsage, boolean): void 0%   (0/1)0%   (0/15)0%   (0/6)
equals (Object): boolean 0%   (0/1)0%   (0/20)0%   (0/5)
getName (VariableUsage): String 0%   (0/1)0%   (0/6)0%   (0/1)
getVariableUsage (): VariableUsage 0%   (0/1)0%   (0/3)0%   (0/1)
isEdited (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
setEdited (boolean): void 0%   (0/1)0%   (0/4)0%   (0/2)
setVariableUsage (VariableUsage): void 0%   (0/1)0%   (0/4)0%   (0/2)

1package de.uka.ipd.sdq.pcmbench.tabs.parameters;
2 
3import org.eclipse.emf.ecore.impl.EObjectImpl;
4 
5import de.uka.ipd.sdq.pcm.parameter.VariableUsage;
6import de.uka.ipd.sdq.pcm.stochasticexpressions.PCMStoExPrettyPrintVisitor;
7 
8/**
9 * The class build a container for VariableUsage value. IsEdited value will by
10 * set:
11 *         - if VariableUsage belong to BasicComponente on 'false'.
12 *  - if VariableUsage belong to AssemblyContect on 'true'.
13 */
14public class VariableUsageWrapper extends EObjectImpl {
15        
16        private VariableUsage variableUsage = null;
17        private boolean isEdited = false;
18        
19        
20        public VariableUsageWrapper() {
21        }
22        
23        public VariableUsageWrapper(VariableUsage variableUsage) {
24                this.variableUsage = variableUsage;
25        }
26 
27        
28        public VariableUsageWrapper(VariableUsage variableUsage, boolean isEdited) {
29                this.variableUsage = variableUsage;
30                this.isEdited = isEdited;
31        }
32 
33 
34        /**
35         * @return the variableUsage
36         */
37        public VariableUsage getVariableUsage() {
38                return variableUsage;
39        }
40 
41 
42        /**
43         * @param variableUsage the variableUsage to set
44         */
45        public void setVariableUsage(VariableUsage variableUsage) {
46                this.variableUsage = variableUsage;
47        }
48 
49 
50        /**
51         * @return the isEdited
52         */
53        public boolean isEdited() {
54                return isEdited;
55        }
56 
57 
58        /**
59         * @param isEdited the isEdited to set
60         */
61        public void setEdited(boolean isEdited) {
62                this.isEdited = isEdited;
63        }
64 
65        /* (non-Javadoc)
66         * @see java.lang.Object#equals(java.lang.Object)
67         */
68        @Override
69        public boolean equals(Object eObject) {
70                if (eObject instanceof VariableUsageWrapper) {
71                        VariableUsageWrapper wrapper = (VariableUsageWrapper) eObject;
72                        return getName(variableUsage).equals(
73                                        getName(wrapper.getVariableUsage()));
74 
75                }
76                return super.equals(eObject);
77        }
78        
79        
80        private String getName(VariableUsage variableUsage){
81                return new PCMStoExPrettyPrintVisitor().prettyPrint(variableUsage);
82        }
83        
84        
85        
86        
87        
88}

[all classes][de.uka.ipd.sdq.pcmbench.tabs.parameters]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov