Class Stats

java.lang.Object
  |
  +--Stats

class Stats
extends java.lang.Object

A Stats object accumulates statistics about a serious of values.


Field Summary
private  int count
          The number of values recorded
private  double max
          The maximum value recorded
private  double min
          The minimum value recorded
private  double sum
          The sum of the values
 
Constructor Summary
(package private) Stats()
           
 
Method Summary
 void record(double d)
          Record another value.
 java.lang.String toString()
          Report statistics about the values recorded.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

count

private int count
The number of values recorded

min

private double min
The minimum value recorded

max

private double max
The maximum value recorded

sum

private double sum
The sum of the values
Constructor Detail

Stats

Stats()
Method Detail

record

public void record(double d)
Record another value.
Parameters:
d - the value to record.

toString

public java.lang.String toString()
Report statistics about the values recorded.
Overrides:
toString in class java.lang.Object
Returns:
a string indicating the min, max, and mean of the values.