< prev index next >
src/java.corba/share/classes/com/sun/corba/se/spi/monitoring/StatisticsAccumulator.java
Print this page
@@ -25,26 +25,22 @@
package com.sun.corba.se.spi.monitoring;
import java.util.*;
/**
- * <p>
- *
* @author Hemanth Puttaswamy
- * </p>
- * <p>
+ *
* StatisticsAccumulator accumulates the samples provided by the user and
* computes the value of minimum, maximum, sum and sample square sum. When
* the StatisticMonitoredAttribute calls getValue(), it will compute all
* the statistics for the collected samples (Which are Minimum, Maximum,
* Average, StandardDeviation) and provides a nice printable record as a
* String.
*
* Users can easily extend this class and provide the implementation of
* toString() method to format the stats as desired. By default all the stats
* are printed in a single line.
- * </p>
*/
public class StatisticsAccumulator {
///////////////////////////////////////
// attributes
@@ -70,23 +66,16 @@
// operations
/**
- * <p>
* User will use this method to just register a sample with the
* StatisticsAccumulator. This is the only method that User will use to
* expose the statistics, internally the StatisticMonitoredAttribute will
* collect the information when requested from the ASAdmin.
- * </p>
- * <p>
- *
- * </p>
- * <p>
*
* @param value a double value to make it more precise
- * </p>
*/
public void sample(double value) {
sampleCount++;
if( value < min ) min = value;
if( value > max) max = value;
@@ -135,23 +124,15 @@
return Math.sqrt(
(sampleSquareSum-((sampleSumSquare)/sampleCount))/(sampleCount-1));
}
/**
- * <p>
* Construct the Statistics Accumulator by providing the unit as a String.
- * The examples of units are "Hours", "Minutes",
- * "Seconds", "MilliSeconds", "Micro Seconds"
- * etc.,
- * </p>
- * <p>
+ * The examples of units are {@literal "Hours", "Minutes",
+ * "Seconds", "MilliSeconds", "Micro Seconds"} etc.
*
- * @return a StatisticsAccumulator with ...
- * </p>
- * <p>
* @param unit a String representing the units for the samples collected
- * </p>
*/
public StatisticsAccumulator( String unit ) {
this.unit = unit;
sampleCount = 0;
sampleSum = 0;
< prev index next >