org.objectweb.jac.lib.stats
Class Stats
java.lang.Object
|
+--org.objectweb.jac.lib.stats.Stats
- public class Stats
- extends Object
This class contains static methods to do statistical computations
on collections.
Constructor Summary |
Stats()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Stats
public Stats()
computeStats
public static void computeStats(Stat stats,
Collection items,
FieldItem field)
- Compute average, min and max of a the field of collection's items
- Parameters:
stats
- store result in this structure. Values are not reset to zero.items
- the items to compute the stats onfield
- the numerical field (float, double or int) to compute the stats of
- Returns:
- an object containing the average, max and min of field
in items. If there's no item in the collection all values are 0.0
computeStats
public static Stat computeStats(Collection items,
FieldItem field)