|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 FormConstructor 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.Object
Object.toString()
public double getAverageTime()
Report
getAverageTime
in interface Report
Report.getAverageTime()
public long getCount()
Report
getCount
in interface Report
Report.getCount()
public double getMinTime()
Report
getMinTime
in interface Report
Report.getMinTime()
public java.lang.String getGroup()
Report
null
then
this is summary report for given lebel (as returned by Report.getLabel()
) in all groups.
getGroup
in interface Report
Report.getGroup()
public java.lang.String getLabel()
Report
null
then
this is summary report for all lebels in given group (as returned by Report.getGroup()
).
getLabel
in interface Report
Report.getLabel()
public double getMaxTime()
Report
getMaxTime
in interface Report
Report.getMaxTime()
public double getTotalTime()
Report
getTotalTime
in interface Report
Report.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.Comparable
arg0
- the Object to be compared.
java.lang.ClassCastException
- if the specified object is not an instnce of Report
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |