View Javadoc

1   package org.codehaus.mojo.dashboard.report.plugin.beans;
2   
3   /*
4    * Copyright 2006 David Vicente
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  import java.util.Date;
20  
21  /**
22   * 
23   * @author <a href="dvicente72@gmail.com">David Vicente</a>
24   * 
25   */
26  public class CpdReportBean extends AbstractReportBean
27  {
28      /**
29       * 
30       */
31      private int nbClasses;
32      /**
33       * 
34       */
35      private int nbDuplicate;
36      /**
37       * 
38       *
39       */
40      public CpdReportBean()
41      {
42      }
43      /**
44       * 
45       * @param dateGeneration
46       */
47      public CpdReportBean( Date dateGeneration )
48      {
49          super( dateGeneration );
50      }
51      /**
52       * 
53       * @return
54       */
55      public int getNbClasses()
56      {
57          return nbClasses;
58      }
59      /**
60       * 
61       * @param nbClasses
62       */
63      public void setNbClasses( int nbClasses )
64      {
65          this.nbClasses = nbClasses;
66      }
67      /**
68       * 
69       * @return
70       */
71      public int getNbDuplicate()
72      {
73          return nbDuplicate;
74      }
75      /**
76       * 
77       * @param nbDuplicate
78       */
79      public void setNbDuplicate( int nbDuplicate )
80      {
81          this.nbDuplicate = nbDuplicate;
82      }
83      /**
84       * 
85       * @param dashboardReport
86       */
87      public void merge( IDashBoardReportBean dashboardReport )
88      {
89          if ( dashboardReport != null && dashboardReport instanceof CpdReportBean )
90          {
91              this.nbClasses = this.nbClasses + ( (CpdReportBean) dashboardReport ).getNbClasses();
92  
93              this.nbDuplicate = this.nbDuplicate + ( (CpdReportBean) dashboardReport ).getNbDuplicate();
94          }
95      }
96  }