KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > cobertura > check > PackageCoverage


1 /*
2  * Cobertura - http://cobertura.sourceforge.net/
3  *
4  * Copyright (C) 2005 Mark Doliner
5  *
6  * Cobertura is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published
8  * by the Free Software Foundation; either version 2 of the License,
9  * or (at your option) any later version.
10  *
11  * Cobertura is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Cobertura; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  */

21
22 package net.sourceforge.cobertura.check;
23
24 public class PackageCoverage
25 {
26
27     private double branchCount;
28     private double lineCount;
29     private double branchCoverage;
30     private double lineCoverage;
31
32     public double getBranchCount()
33     {
34         return branchCount;
35     }
36
37     public void addBranchCount(double branchCount)
38     {
39         this.branchCount += branchCount;
40     }
41
42     public double getLineCount()
43     {
44         return lineCount;
45     }
46
47     public void addLineCount(double lineCount)
48     {
49         this.lineCount += lineCount;
50     }
51
52     public double getBranchCoverage()
53     {
54         return branchCoverage;
55     }
56
57     public void addBranchCoverage(double branchCoverage)
58     {
59         this.branchCoverage += branchCoverage;
60     }
61
62     public double getLineCoverage()
63     {
64         return lineCoverage;
65     }
66
67     public void addLineCoverage(double lineCoverage)
68     {
69         this.lineCoverage += lineCoverage;
70     }
71
72 }
73
Popular Tags