2
* Cobertura - http://cobertura.sourceforge.net/
4
* This file was taken from JavaNCSS
5
* http://www.kclee.com/clemens/java/javancss/
6
* Copyright (C) 2000 Chr. Clemens Lee <clemens a.t kclee d.o.t com>
8
* Cobertura is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published
10
* by the Free Software Foundation; either version 2 of the License,
11
* or (at your option) any later version.
13
* Cobertura is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with Cobertura; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
29
* WARNING TO COBERTURA DEVELOPERS
31
* DO NOT MODIFY THIS FILE!
33
* MODIFY THE FILES UNDER THE JAVANCSS DIRECTORY LOCATED AT THE ROOT OF THE COBERTURA PROJECT.
35
* FOLLOW THE PROCEDURE FOR MERGING THE LATEST JAVANCSS INTO COBERTURA LOCATED AT
36
* javancss/coberturaREADME.txt
38
* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
40
package net.sourceforge.cobertura.javancss;
43
* Basic data class to store all metrics attached to a package.
45
* @author Chr. Clemens Lee <clemens@kclee.com>
46
* @version $Id: PackageMetric.java 121 2009-01-17 22:19:45Z hboutemy $
48
public class PackageMetric extends Metric
50
public int classes = 0;
51
public int functions = 0;
53
public PackageMetric()
65
public void add(PackageMetric pPackageMetric_) {
66
if (pPackageMetric_ == null) {
69
classes += pPackageMetric_.classes;
70
functions += pPackageMetric_.functions;
71
ncss += pPackageMetric_.ncss;
73
javadocs += pPackageMetric_.javadocs;
74
javadocsLn += pPackageMetric_.javadocsLn;
75
singleLn += pPackageMetric_.singleLn;
76
multiLn += pPackageMetric_.multiLn;