org.ow2.clif.analyze.statistics.util.data
Class Math4Long
java.lang.Object
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
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 |
Math4Long
public Math4Long()
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 roundedsize
- 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)