1 /*
2 Bloof - visualize the evolution of your software project
3 Copyright ( C ) 2003 Lukasz Pekacki <lukasz@pekacki.de>
4 http://bloof.sf.net/
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along with
15 this program; if not, write to the Free Software Foundation, Inc.,
16 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
18 $RCSfile: DeveloperGroup.java,v $
19 Created on $Date: 2003/09/06 08:35:09 $
20 */
21 package net.sf.bloof.metrics;
22
23 /***
24 * Represents a group of developers. Acts as filter for a {@link net.sf.bloof.metrics.Metric}
25 * @author Lukasz Pekacki <pekacki@users.sourceforge.net>
26 * @version $Id: DeveloperGroup.java,v 1.5 2003/09/06 08:35:09 pekacki Exp $
27 */
28 public class DeveloperGroup implements Filter {
29 /***
30 * Default constructor
31 * @param aDevelNames names of developers
32 * @param aName name of the group
33 */
34 public DeveloperGroup(String[] aDevelNames, String aName) {
35 mName = aName;
36 mDevelNames = aDevelNames;
37 mFilterType = Filter.DEVELOPER;
38
39 }
40
41 /***
42 * @see java.lang.Object#toString( )
43 */
44 public String getContent() {
45 StringBuffer sb = new StringBuffer();
46 for (int i = 0; i < mDevelNames.length; i++) {
47 sb.append(mDevelNames[i]);
48 if (i < mDevelNames.length -1) {
49 sb.append(",");
50 }
51 }
52
53 return sb.toString();
54 }
55 /***
56 * @see net.sf.bloof.metrics.Filter#getFilterType()
57 */
58 public int getFilterType() {
59 return mFilterType;
60 }
61 /***
62 * @see net.sf.bloof.metrics.Filter#getName( )
63 */
64 public String getName() {
65 return mName;
66 }
67 /***
68 * Returns the names of the developers in this filter
69 * @return names of the developers in this filter
70 */
71 public String[] getNames() {
72 return mDevelNames;
73 }
74 /***
75 * @see net.sf.bloof.metrics.Filter#setName(java.lang.String)
76 */
77 public void setName(String aName) {
78 mName = aName;
79
80 }
81
82 /*** (non-Javadoc)
83 * @see java.lang.Object#toString()
84 */
85 public String toString() {
86 return mName;
87 }
88 private String[] mDevelNames;
89 private int mFilterType;
90 private String mName;
91 }
This page was automatically generated by Maven