View Javadoc

1   /*
2    * $Id: Report.java,v 1.1 2006/03/01 17:48:04 azzazzel Exp $
3    *
4    * Copyright 2006 Commsen International
5    * 
6    * Licensed under the Common Public License, Version 1.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.opensource.org/licenses/cpl1.0.txt
11   * 
12   * THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS 
14   * OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
15   *
16   */
17  package com.commsen.stopwatch;
18  
19  import java.io.Serializable;
20  
21  /***
22   * Basic stopwatch report. All reports generated by stopwatch storages should implement this
23   * interface.
24   * 
25   * @author Milen Dyankov
26   * 
27   */
28  public interface Report extends Serializable, Comparable {
29  
30  	/***
31  	 * Information about the group for which this report was generated. If <code>null</code> then
32  	 * this is summary report for given lebel (as returned by {@link #getLabel()}) in all groups.
33  	 * 
34  	 * @return the name of the group
35  	 */
36  	public String getGroup();
37  
38  
39  	/***
40  	 * Information about the label for which this report was generated. If <code>null</code> then
41  	 * this is summary report for all lebels in given group (as returned by {@link #getGroup()}).
42  	 * 
43  	 * @return the label
44  	 */
45  	public String getLabel();
46  
47  
48  	/***
49  	 * The minimal of all completed measurements for this label and/or group
50  	 * 
51  	 * @return minimal of all times measured
52  	 */
53  	public double getMinTime();
54  
55  
56  	/***
57  	 * The maximal of all completed measurements for this label and/or group
58  	 * 
59  	 * @return maximal of all completed measurements
60  	 */
61  	public double getMaxTime();
62  
63  
64  	/***
65  	 * The average of all completed measurements for this label and/or group
66  	 * 
67  	 * @return average of all completed measurements
68  	 */
69  	public double getAverageTime();
70  
71  
72  	/***
73  	 * The sum of all completed measurements for this label and/or group
74  	 * 
75  	 * @return sum of all completed measurements
76  	 */
77  	public double getTotalTime();
78  
79  
80  	/***
81  	 * The number of all completed measurements for this label and/or group
82  	 * 
83  	 * @return number of all completed measurements
84  	 */
85  	public long getCount();
86  
87  }