org.ow2.clif.analyze.statistics.util.data
Class Math4Long

java.lang.Object
  extended by org.ow2.clif.analyze.statistics.util.data.Math4Long

public final class Math4Long
extends java.lang.Object

Math extension more specifically tuned to deal with statistical analysis of time measures

Author:
Guy Vachet

Constructor Summary
Math4Long()
           
 
Method Summary
static double displayDouble(double nb)
           
static double displayDouble(double nb, int digitNb)
           
static java.lang.String displayMillisecTime(long t)
           
static java.lang.String displaySecondTime(long t)
           
static double round(double d)
          rounds a double keeping only "n" digits (default way) considering this double is representing a time measurement.
static double round(double d, int size)
          refines the rounding of a double keeping only "n" digits considering the number of measures used to calculate this double (typical of average..)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Math4Long

public Math4Long()
Method Detail

round

public static double round(double d)
rounds a double keeping only "n" digits (default way) considering this double is representing a time measurement.

Parameters:
d - the double to be rounded
Returns:
the rounded value of this double

round

public static double round(double d,
                           int size)
refines the rounding of a double keeping only "n" digits considering the number of measures used to calculate this double (typical of average..)

Parameters:
d - the double to be rounded
size - is the number of measures to compute this double
Returns:
the rounded value of this double considering the measure number

displayDouble

public static double displayDouble(double nb,
                                   int digitNb)

displayDouble

public static double displayDouble(double nb)

displayMillisecTime

public static java.lang.String displayMillisecTime(long t)
Parameters:
t - time in millisecond to be displayed
Returns:
time in human readable display (by using convenient unit)

displaySecondTime

public static java.lang.String displaySecondTime(long t)
Parameters:
t - time in second to be displayed
Returns:
time in human readable display (by using convenient unit)