|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.commsen.stopwatch.reports.DefaultStopwatchReport
public class DefaultStopwatchReport
This is the default implementation of Report interface. It is
mainly used by DefaultStopwatchEngine.
Note: this class has a natural ordering that is inconsistent with equals.
Report,
Serialized Form| Constructor Summary | |
|---|---|
DefaultStopwatchReport(java.lang.String group,
java.lang.String label,
long count,
double minTime,
double maxTime,
double averageTime,
double totalTime)
Creates new instance of this class. |
|
| Method Summary | |
|---|---|
int |
compareTo(java.lang.Object arg0)
Compares this report with the specified report for order. |
boolean |
equals(java.lang.Object obj)
|
double |
getAverageTime()
The average of all completed measurements for this label and/or group |
long |
getCount()
The number of all completed measurements for this label and/or group |
java.lang.String |
getGroup()
Information about the group for which this report was generated. |
java.lang.String |
getLabel()
Information about the label for which this report was generated. |
double |
getMaxTime()
The maximal of all completed measurements for this label and/or group |
double |
getMinTime()
The minimal of all completed measurements for this label and/or group |
double |
getTotalTime()
The sum of all completed measurements for this label and/or group |
int |
hashCode()
|
java.lang.String |
toString()
Generates string representation of this report |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultStopwatchReport(java.lang.String group,
java.lang.String label,
long count,
double minTime,
double maxTime,
double averageTime,
double totalTime)
group - label - count - minTime - maxTime - averageTime - totalTime - | Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public double getAverageTime()
Report
getAverageTime in interface ReportReport.getAverageTime()public long getCount()
Report
getCount in interface ReportReport.getCount()public double getMinTime()
Report
getMinTime in interface ReportReport.getMinTime()public java.lang.String getGroup()
Reportnull then
this is summary report for given lebel (as returned by Report.getLabel()) in all groups.
getGroup in interface ReportReport.getGroup()public java.lang.String getLabel()
Reportnull then
this is summary report for all lebels in given group (as returned by Report.getGroup()).
getLabel in interface ReportReport.getLabel()public double getMaxTime()
Report
getMaxTime in interface ReportReport.getMaxTime()public double getTotalTime()
Report
getTotalTime in interface ReportReport.getTotalTime()public int compareTo(java.lang.Object arg0)
Note: this class has a natural ordering that is inconsistent with equals:
Reports are compared by the value of totalTime. Report A is considered to be
less then report B when A.getTotalTime() > B.getTotoalTime()
compareTo in interface java.lang.Comparablearg0 - the Object to be compared.
java.lang.ClassCastException - if the specified object is not an instnce of Reportpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||