KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hammurapi > inspectors > metrics > PackageOccuranceInLayer


1 /*
2  * Hammurapi
3  * Automated Java code review system.
4  * Copyright (C) 2004 Johannes Bellert
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  * URL: http://www.hammurapi.com
21  * e-Mail: Johannes.Bellert@ercgroup.com
22  *
23  * * Created on Apr 26, 2004
24  *
25  */

26 package org.hammurapi.inspectors.metrics;
27
28 import java.util.Vector JavaDoc;
29
30 /**
31  * @author Johannes Bellert
32  *
33  */

34 public class PackageOccuranceInLayer {
35     
36     private String JavaDoc packageName = "";
37     private int occurance = 1;
38     private Vector JavaDoc layerList = new Vector JavaDoc();
39     
40     public PackageOccuranceInLayer ( String JavaDoc _name){
41         super();
42         packageName = _name;
43     }
44
45     public boolean equals( Object JavaDoc poil){
46         
47         return packageName.equals(((PackageOccuranceInLayer)poil).packageName);
48     }
49         
50     public String JavaDoc toString(){
51         return packageName + " - " + occurance;
52     }
53     /**
54      * @return Returns the occurance.
55      */

56     public int getOccurance() {
57         return occurance;
58     }
59     /**
60      * @param occurance The occurance to set.
61      */

62     public void setOccurance(int occurance) {
63         this.occurance = occurance;
64     }
65     /**
66      * @return Returns the packageName.
67      */

68     public String JavaDoc getPackageName() {
69         return packageName;
70     }
71     /**
72      * @param packageName The packageName to set.
73      */

74     public void setPackageName(String JavaDoc packageName) {
75         this.packageName = packageName;
76     }
77     /**
78      * @return Returns the layerList.
79      */

80     public Vector JavaDoc getLayerList() {
81         return layerList;
82     }
83     /**
84      * @param layerList The layerList to set.
85      */

86     public void setLayerList(Vector JavaDoc layerList) {
87         this.layerList = layerList;
88     }
89 }
90
Popular Tags