com.ibm.websphere.externalnode
Class AverageStatistic

java.lang.Object
  extended by com.ibm.websphere.externalnode.Statistic
      extended by com.ibm.websphere.externalnode.AverageStatistic
All Implemented Interfaces:
java.lang.Cloneable

public class AverageStatistic
extends Statistic
implements java.lang.Cloneable

A simple bean class to hold the fields of an average statistic.


Field Summary
protected  long count
          Number of samples involved in this statistic.
protected  long max
          Maximum value of all the samples.
protected  long min
          Minimum value of all the samples.
protected  long total
          Sum of the values of all the samples.
 
Fields inherited from class com.ibm.websphere.externalnode.Statistic
description, lastSampleTime, name, nodeSpeed, numberOfCPUs, startTime, unit
 
Constructor Summary
AverageStatistic(long count, long min, long max, long total, long startTime, long lastSampleTime)
          Constructs an AverageStatistic with the specified field values.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 long getCount()
          Returns the number of samples involved in this statistic.
 long getMax()
          Returns the maximum value of all the samples.
 double getMean()
          Returns the mean or average (getTotal() divided by getCount()).
 long getMin()
          Returns the minimum value of all the samples.
 long getTotal()
          Returns the sum of the values of all the samples.
 java.lang.String toString()
          Returns the String representation of this statistic.
 
Methods inherited from class com.ibm.websphere.externalnode.Statistic
getDescription, getLastSampleTime, getName, getNodeSpeed, getNumberOfCPUs, getStartTime, getUnit, setDescription, setName, setNodeSpeed, setNumberOfCPUs, setStartAndLastSampleTimes, setUnit
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

count

protected long count
Number of samples involved in this statistic.


min

protected long min
Minimum value of all the samples.


max

protected long max
Maximum value of all the samples.


total

protected long total
Sum of the values of all the samples.

Constructor Detail

AverageStatistic

public AverageStatistic(long count,
                        long min,
                        long max,
                        long total,
                        long startTime,
                        long lastSampleTime)
Constructs an AverageStatistic with the specified field values.

Parameters:
count - the number of samples involved in this statistic.
min - the minimum value of all the samples.
max - the maximum value of all the samples.
total - the sum of the values of all the samples.
startTime - the time of the first sample represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
lastSampleTime - the time of the last sample represented as a long, whose value is the number of milliseconds since January 1, 1970, 00:00:00.
Method Detail

getCount

public long getCount()
Returns the number of samples involved in this statistic.


getMax

public long getMax()
Returns the maximum value of all the samples.


getMin

public long getMin()
Returns the minimum value of all the samples.


getTotal

public long getTotal()
Returns the sum of the values of all the samples.


getMean

public double getMean()
Returns the mean or average (getTotal() divided by getCount()).


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class Statistic
Throws:
java.lang.CloneNotSupportedException

toString

public java.lang.String toString()
Returns the String representation of this statistic.

Overrides:
toString in class java.lang.Object